|
| 1 | +export fn entry1() void { |
| 2 | + const p: **u32 = undefined; |
| 3 | + const q: **i32 = p; |
| 4 | + _ = q; |
| 5 | +} |
| 6 | + |
| 7 | +export fn entry2() void { |
| 8 | + const p: [*]*u32 = undefined; |
| 9 | + const q: [*]*i32 = p; |
| 10 | + _ = q; |
| 11 | +} |
| 12 | + |
| 13 | +export fn entry3() void { |
| 14 | + const p: []*u32 = undefined; |
| 15 | + const q: []*i32 = p; |
| 16 | + _ = q; |
| 17 | +} |
| 18 | + |
| 19 | +export fn entry4() void { |
| 20 | + const p: [*c]*u32 = undefined; |
| 21 | + const q: [*c]*i32 = p; |
| 22 | + _ = q; |
| 23 | +} |
| 24 | + |
| 25 | +// error |
| 26 | +// |
| 27 | +// :3:22: error: expected type '**i32', found '**u32' |
| 28 | +// :3:22: note: pointer type child '*u32' cannot cast into pointer type child '*i32' |
| 29 | +// :3:22: note: pointer type child 'u32' cannot cast into pointer type child 'i32' |
| 30 | +// :3:22: note: signed 32-bit int cannot represent all possible unsigned 32-bit values |
| 31 | +// :9:24: error: expected type '[*]*i32', found '[*]*u32' |
| 32 | +// :9:24: note: pointer type child '*u32' cannot cast into pointer type child '*i32' |
| 33 | +// :9:24: note: pointer type child 'u32' cannot cast into pointer type child 'i32' |
| 34 | +// :9:24: note: signed 32-bit int cannot represent all possible unsigned 32-bit values |
| 35 | +// :15:23: error: expected type '[]*i32', found '[]*u32' |
| 36 | +// :15:23: note: pointer type child '*u32' cannot cast into pointer type child '*i32' |
| 37 | +// :15:23: note: pointer type child 'u32' cannot cast into pointer type child 'i32' |
| 38 | +// :15:23: note: signed 32-bit int cannot represent all possible unsigned 32-bit values |
| 39 | +// :21:25: error: expected type '[*c]*i32', found '[*c]*u32' |
| 40 | +// :21:25: note: pointer type child '*u32' cannot cast into pointer type child '*i32' |
| 41 | +// :21:25: note: pointer type child 'u32' cannot cast into pointer type child 'i32' |
| 42 | +// :21:25: note: signed 32-bit int cannot represent all possible unsigned 32-bit values |
0 commit comments