Commit fcc7e378f8

mlugg <mlugg@mlugg.co.uk>
2025-09-10 13:50:09
Revert "delete failing test case"
This reverts commit ba4d4602ab9bb0dc17fc0d57141d9324bdbb356d.
1 parent 2f9d8d5
Changed files (1)
test
test/cases/compile_errors/enum_field_value_references_enum.zig
@@ -0,0 +1,17 @@
+pub const Foo = enum(c_int) {
+    A = Foo.B,
+    C = D,
+
+    pub const B = 0;
+};
+export fn entry() void {
+    const s: Foo = Foo.E;
+    _ = s;
+}
+const D = 1;
+
+// error
+// backend=stage2
+// target=native
+//
+// :1:5: error: dependency loop detected