| 1 | const E = enum { |
| 2 | a, |
| 3 | b, |
| 4 | c, |
| 5 | }; |
| 6 | const U = union(E) { |
| 7 | a: i32, |
| 8 | b: f64, |
| 9 | c: f64, |
| 10 | d: f64, |
| 11 | }; |
| 12 | export fn entry() usize { |
| 13 | return @sizeOf(U); |
| 14 | } |
| 15 | |
| 16 | // error |
| 17 | // |
| 18 | // :10:5: error: no field named 'd' in enum 'tmp.E' |
| 19 | // :1:11: note: enum declared here |