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

// error
// backend=stage2
// target=native
//
// :3:5: error: enumeration value '256' too large for type 'u8'