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

// error
// backend=stage2
// target=native
//
// :3:17: error: type 'u3' cannot represent integer value '8'