mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
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
This commit is contained in:
parent
bdd3bc056e
commit
a7dd34bfc5
30
test/incremental/remove_invalid_union_backing_enum
Normal file
30
test/incremental/remove_invalid_union_backing_enum
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#target=x86_64-linux-selfhosted
|
||||||
|
#target=x86_64-linux-cbe
|
||||||
|
#target=x86_64-windows-cbe
|
||||||
|
#update=initial version
|
||||||
|
#file=main.zig
|
||||||
|
const E = enum { a, b, c };
|
||||||
|
const U = union(E) {
|
||||||
|
a: i32,
|
||||||
|
b: f64,
|
||||||
|
c: f64,
|
||||||
|
d: f64,
|
||||||
|
};
|
||||||
|
pub fn main() void {
|
||||||
|
const u: U = .{ .a = 123 };
|
||||||
|
_ = u;
|
||||||
|
}
|
||||||
|
#expect_error=ignored
|
||||||
|
#update=remove invalid backing enum
|
||||||
|
#file=main.zig
|
||||||
|
const U = union {
|
||||||
|
a: i32,
|
||||||
|
b: f64,
|
||||||
|
c: f64,
|
||||||
|
d: f64,
|
||||||
|
};
|
||||||
|
pub fn main() void {
|
||||||
|
const u: U = .{ .a = 123 };
|
||||||
|
_ = u;
|
||||||
|
}
|
||||||
|
#expect_stdout=""
|
||||||
Loading…
x
Reference in New Issue
Block a user