authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-03-15 12:32:17-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-03-15 12:32:17-07:00
log7177b3994626114e57bf8df36ca84fd942bac282
tree34caaa3f320e8830a5f1f1c93a4b5d70c0d192a8
parent1f59994a37afcfa5909440a05bcff5990b3a4651

fix test-case copy-paste typo from earlier commit

commit 3204d00a5e7fe119b690e921138a439fb84dff5b intended to move this passing test case from stage1 folder but it was accidentally changed to have identical contents as a different test case instead. Fortunately, the test case has not regressed, so I simply replaced it with the intended test from before.

1 files changed, 8 insertions(+), 4 deletions(-)

test/cases/compile_errors/undefined_as_field_type_is_rejected.zig+8-4
...@@ -1,9 +1,13 @@...@@ -1,9 +1,13 @@
1export fn a() void {1const Foo = struct {
2 b();2 a: undefined,
3};
4export fn entry1() void {
5 const foo: Foo = undefined;
6 _ = foo;
3}7}
48
5// error9// error
6// backend=stage210// backend=stage1
7// target=native11// target=native
8//12//
9// :2:5: error: use of undeclared identifier 'b'13// tmp.zig:2:8: error: use of undefined value here causes undefined behavior