aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/integer_overflow_error.zig
blob: 9de1a2820f5ecf926df95d052dbce3decafcc1b2 (plain)
1
2
3
4
5
6
7
8
9
10
const x: u8 = 300;
export fn entry() usize {
    return @sizeOf(@TypeOf(x));
}

// error
// backend=stage2
// target=native
//
// :1:15: error: type 'u8' cannot represent integer value '300'