Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/test14538.d

raw
1
2 /*
3 TEST_OUTPUT:
4 ---
5 fail_compilation/test14538.d(18): Error: return value `x ? cast(uint)this.fCells[x].code : 32u` of type `uint` does not match return type `Cell`, and cannot be implicitly converted
6 ---
7 */
8
9 struct Cell
10 {
11 dchar code;
12 alias code this;
13 }
14
15 struct Row
16 {
17 Cell[] fCells;
18 Cell opIndex(size_t x) { return x ? fCells[x] : ' '; }
19 }