| author | |
| committer | |
| log | a7dd34bfc57f4f84bb5290177f26e2d1f0bdc27e |
| tree | 64e1ce5da32dca5365ea334b8bf0999b55358ae4 |
| parent | bdd3bc056ee998770ea48a93b4ec99521f069aed |
| signature | Commit is signed but in an unrecognized format. |
This isn't exactly the case provided in #11290, but is a slightly
simpler case which I know would have triggered the same bug in the old
implementation of incremental compilation.
Resolves: #112901 files changed, 30 insertions(+), 0 deletions(-)
test/incremental/remove_invalid_union_backing_enum created+30| ... | ... | @@ -0,0 +1,30 @@ |
| 1 | #target=x86_64-linux-selfhosted | |
| 2 | #target=x86_64-linux-cbe | |
| 3 | #target=x86_64-windows-cbe | |
| 4 | #update=initial version | |
| 5 | #file=main.zig | |
| 6 | const E = enum { a, b, c }; | |
| 7 | const U = union(E) { | |
| 8 | a: i32, | |
| 9 | b: f64, | |
| 10 | c: f64, | |
| 11 | d: f64, | |
| 12 | }; | |
| 13 | pub fn main() void { | |
| 14 | const u: U = .{ .a = 123 }; | |
| 15 | _ = u; | |
| 16 | } | |
| 17 | #expect_error=ignored | |
| 18 | #update=remove invalid backing enum | |
| 19 | #file=main.zig | |
| 20 | const U = union { | |
| 21 | a: i32, | |
| 22 | b: f64, | |
| 23 | c: f64, | |
| 24 | d: f64, | |
| 25 | }; | |
| 26 | pub fn main() void { | |
| 27 | const u: U = .{ .a = 123 }; | |
| 28 | _ = u; | |
| 29 | } | |
| 30 | #expect_stdout="" |