master
 1#target=x86_64-linux-selfhosted
 2#target=x86_64-windows-selfhosted
 3#target=x86_64-linux-cbe
 4#target=x86_64-windows-cbe
 5#target=wasm32-wasi-selfhosted
 6#update=initial version
 7#file=main.zig
 8const E = enum { a, b, c };
 9const U = union(E) {
10    a: i32,
11    b: f64,
12    c: f64,
13    d: f64,
14};
15pub fn main() void {
16    const u: U = .{ .a = 123 };
17    _ = u;
18}
19#expect_error=main.zig:6:5: error: no field named 'd' in enum 'main.E'
20#expect_error=main.zig:1:11: note: enum declared here
21#update=remove invalid backing enum
22#file=main.zig
23const U = union {
24    a: i32,
25    b: f64,
26    c: f64,
27    d: f64,
28};
29pub fn main() void {
30    const u: U = .{ .a = 123 };
31    _ = u;
32}
33#expect_stdout=""