Beef
Beef copied to clipboard
[Enhancement] Brace initialize const struct
This doesn't work, but I think it should:
struct S { public int x, y; }
const S s = .{ x=42, y=314 };
If nothing else, then the error message should at least be changed. Currently it says "Expression does not evaluate to constant value".
There's a better error at 0ee161c314a7786fd5ae4566d6391d830cd86e82 It would be nice to be able to have this actually supported, but it's non-trivial and likely won't happen any time soon
Understandable. It's by no means crucial.