test_intCast_builtin.zig (182B) - Raw
1 test "integer cast panic" { 2 var a: u16 = 0xabcd; // runtime-known 3 _ = &a; 4 const b: u8 = @intCast(a); 5 _ = b; 6 } 7 8 // test_error=integer does not fit in destination type
zigfork of https://codeberg.org/ziglang/zig | |
| Log | Files | Refs | README | LICENSE |