authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-09-10 12:50:09+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-09-20 18:33:01-07:00
logfcc7e378f87bd1ef7abd53ce3ff1d20d3baff578
tree0f28a2a091ac5f4744a692043fc729494105a47b
parent2f9d8d5a9b14d7bf258e143e5ca96866102c7957

Revert "delete failing test case"

This reverts commit ba4d4602ab9bb0dc17fc0d57141d9324bdbb356d.

1 files changed, 17 insertions(+), 0 deletions(-)

test/cases/compile_errors/enum_field_value_references_enum.zig created+17
......@@ -0,0 +1,17 @@
1pub const Foo = enum(c_int) {
2 A = Foo.B,
3 C = D,
4
5 pub const B = 0;
6};
7export fn entry() void {
8 const s: Foo = Foo.E;
9 _ = s;
10}
11const D = 1;
12
13// error
14// backend=stage2
15// target=native
16//
17// :1:5: error: dependency loop detected