| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/ice10938.d(14): Error: no property `opts` for `this` of type `ice10938.C` |
| 5 |
fail_compilation/ice10938.d(19): Error: forward reference to inferred return type of function call `this.opDispatch()` |
| 6 |
fail_compilation/ice10938.d(14): Error: template instance `ice10938.C.opDispatch!"opts"` error instantiating |
| 7 |
--- |
| 8 |
*/ |
| 9 |
|
| 10 |
class C |
| 11 |
{ |
| 12 |
this() |
| 13 |
{ |
| 14 |
this.opts["opts"] = 1; |
| 15 |
} |
| 16 |
|
| 17 |
auto opDispatch(string field : "opts")() |
| 18 |
{ |
| 19 |
return this.opts; // ICE -> compile time error |
| 20 |
} |
| 21 |
} |
| 22 |
|
| 23 |
void main() |
| 24 |
{ |
| 25 |
} |