aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/enum_field_value_references_enum.zig
blob: 7c258adce71f4296c9c2dc30a83f64f576015d1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub const Foo = enum(c_int) {
    A = Foo.B,
    C = D,
};
export fn entry() void {
    const s: Foo = Foo.E;
    _ = s;
}
const D = 1;

// error
// backend=stage2
// target=native
//
// :1:5: error: dependency loop detected