aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/overflow_in_enum_value_allocation.zig
blob: 35f3c193dfe343fdc387c972f7fb145af8f4190d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
const Moo = enum(u8) {
    Last = 255,
    Over,
};
pub export fn entry() void {
    const y = Moo.Last;
    _ = y;
}

// error
//
// :3:5: error: enumeration value '256' too large for type 'u8'