gcc/testsuite/gdc.test/fail_compilation/test19112.d
raw| 1 | /* TEST_OUTPUT: |
| 2 | --- |
| 3 | fail_compilation/test19112.d(13): Error: cannot implicitly convert expression `[123, 456]` of type `int[]` to `int[1]` |
| 4 | fail_compilation/test19112.d(15): Error: cannot implicitly convert expression `a` of type `int[]` to `int[1]` |
| 5 | --- |
| 6 | */ |
| 7 | |
| 8 | // https://issues.dlang.org/show_bug.cgi?id=19112 |
| 9 | |
| 10 | void main() |
| 11 | { |
| 12 | int[int[1]] aa; |
| 13 | int* p = [123, 456] in aa; |
| 14 | int[] a; |
| 15 | p = a in aa; |
| 16 | } |