gcc/testsuite/gdc.test/fail_compilation/fail22144.d
raw| 1 | // https://issues.dlang.org/show_bug.cgi?id=22144 |
| 2 | /* TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail22144.d(12): Error: cannot cast expression `zarray1` of type `int[0]` to `int[0][]` since sizes don't line up |
| 5 | --- |
| 6 | */ |
| 7 | void main() |
| 8 | { |
| 9 | int[0] zarray1; |
| 10 | int[0][0] zarray2; |
| 11 | |
| 12 | auto zslice1 = cast(int[0][])zarray1; // ICE -> Error |
| 13 | auto zslice2 = cast(int[0][])zarray2; // ICE -> OK |
| 14 | } |