| 1 | const Foo = enum { a }; |
| 2 | pub export fn entry1() void { |
| 3 | const arr = [_]Foo{.a}; |
| 4 | _ = arr ++ .{.b}; |
| 5 | } |
| 6 | pub export fn entry2() void { |
| 7 | const b = .{.b}; |
| 8 | const arr = [_]Foo{.a}; |
| 9 | _ = arr ++ b; |
| 10 | } |
| 11 | |
| 12 | // error |
| 13 | // |
| 14 | // :4:19: error: no field named 'b' in enum 'tmp.Foo' |
| 15 | // :1:13: note: enum declared here |
| 16 | // :9:16: error: no field named 'b' in enum 'tmp.Foo' |
| 17 | // :1:13: note: enum declared here |