| 1 | comptime { |
| 2 | const value: i32 = -1; |
| 3 | const unsigned: u32 = @intCast(value); |
| 4 | _ = unsigned; |
| 5 | } |
| 6 | export fn entry1() void { |
| 7 | const value: i32 = -1; |
| 8 | const unsigned: u32 = value; |
| 9 | _ = unsigned; |
| 10 | } |
| 11 | |
| 12 | // error |
| 13 | // |
| 14 | // :3:36: error: type 'u32' cannot represent integer value '-1' |
| 15 | // :8:27: error: type 'u32' cannot represent integer value '-1' |