authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-10-16 14:21:13+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-10-16 14:22:33+01:00
loga7dd34bfc57f4f84bb5290177f26e2d1f0bdc27e
tree64e1ce5da32dca5365ea334b8bf0999b55358ae4
parentbdd3bc056ee998770ea48a93b4ec99521f069aed
signaturelock-open Commit is signed but in an unrecognized format.

incremental: add new test case

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: #11290

1 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
6const E = enum { a, b, c };
7const U = union(E) {
8 a: i32,
9 b: f64,
10 c: f64,
11 d: f64,
12};
13pub 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
20const U = union {
21 a: i32,
22 b: f64,
23 c: f64,
24 d: f64,
25};
26pub fn main() void {
27 const u: U = .{ .a = 123 };
28 _ = u;
29}
30#expect_stdout=""