aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/zero_width_nonexhaustive_enum.zig
blob: a38c5f357adc794b0049473eea29e636bbad0203 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
comptime {
    _ = enum(i0) { a, _ };
}

comptime {
    _ = enum(u0) { a, _ };
}

comptime {
    _ = enum(u0) { a, b, _ };
}

// error
//
// :2:9: error: non-exhaustive enum specifies every value
// :6:9: error: non-exhaustive enum specifies every value
// :10:23: error: enumeration value '1' too large for type 'u0'