c3c icon indicating copy to clipboard operation
c3c copied to clipboard

Struct member of type void crashes compiler

Open cbuttner opened this issue 1 year ago • 3 comments

struct Foo {
  void bar;
}

fn void main(String[] args) {
  Foo foo;
}

Kind of unusual, but this crashes the compiler.

cbuttner avatar Feb 19 '24 17:02 cbuttner

Fixed in 0.5.5

lerno avatar Feb 19 '24 20:02 lerno

def Void = void;
struct Foo {
  Void bar;
}

Is still an issue.

cbuttner avatar Feb 26 '24 12:02 cbuttner

Thank you. Latest should have addressed this deficiency. There might be others lurking with Void* etc, but none that I found right now.

lerno avatar Feb 26 '24 17:02 lerno

Is this working?

lerno avatar Apr 03 '24 11:04 lerno

I found one more issue with distinct:

distinct Void = void;
struct Foo {
  Void bar;
}
fn void main() {
  Foo foo;
}

cbuttner avatar Apr 09 '24 13:04 cbuttner

Ah that one is in 0.6.0

lerno avatar Apr 09 '24 13:04 lerno

@cbuttner It should work ok in dev now.

lerno avatar Apr 09 '24 13:04 lerno

I couldn't find any more related issues, so I'm considering this fixed now.

cbuttner avatar Apr 17 '24 12:04 cbuttner