aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/invalid_shift_amount_error.zig
blob: b47fb79d215cdf5e44eda8010b9468f96241115d (plain)
1
2
3
4
5
6
7
8
9
10
11
const x: u8 = 2;
fn f() u16 {
    return x << 8;
}
export fn entry() u16 {
    return f();
}

// error
//
// :3:17: error: type 'u3' cannot represent integer value '8'