aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/coercion_to_optional.zig
blob: b44f07062497793b8be13177897cd00525b924f7 (plain)
1
2
3
4
5
6
7
8
9
export fn a() void {
    const x: ?u8 = 256;
    _ = x;
}

// error
//
// 2:20: error: expected type '?u8', found 'comptime_int'
// 2:20: note: type 'u8' cannot represent value '256'