c3c
c3c copied to clipboard
Compiler crash with designated initializers
bitstruct Flags : int {
bool flag1;
}
struct Foo {
long x;
Flags flags;
}
fn int main(String[] args) {
long x;
Foo foo = {
.x = x,
.flags.flag1 = true, // Compiler crash here
};
return 0;
}
This should now work.
This fix broke assigning to bitstructs with designated initializers.
bitstruct Flags : int {
bool flag1;
}
struct Foo {
long x;
Flags flags;
}
fn int main(String[] args)
{
long x;
Flags flags;
Foo foo = {
.x = x,
.flags = flags,
};
return 0;
}
I'm sorry about that. It should work properly now.
Looks fixed, thanks!