]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/test14538.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test14538.d
1 // PERMUTE_ARGS:
2
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/test14538.d(19): Error: cannot implicitly convert expression `x ? cast(uint)this.fCells[x].code : 32u` of type `uint` to `Cell`
7 ---
8 */
9
10 struct Cell
11 {
12 dchar code;
13 alias code this;
14 }
15
16 struct Row
17 {
18 Cell[] fCells;
19 Cell opIndex(size_t x) { return x ? fCells[x] : ' '; }
20 }