gcc/testsuite/gdc.test/fail_compilation/test20383.d
raw| 1 | /* TEST_OUTPUT: |
| 2 | --- |
| 3 | fail_compilation/test20383.d(11): Error: invalid array operation `cast(int[])data[] & [42]` (possible missing []) |
| 4 | --- |
| 5 | */ |
| 6 | |
| 7 | // https://issues.dlang.org/show_bug.cgi?id=20383 |
| 8 | |
| 9 | ubyte[1] ice(ubyte[1] data) |
| 10 | { |
| 11 | ubyte[1] result = data[] & [42]; |
| 12 | return result; |
| 13 | } |