gcc/testsuite/gdc.test/fail_compilation/test17380.d
raw| 1 | /* TEST_OUTPUT: |
| 2 | --- |
| 3 | fail_compilation/test17380.d(12): Error: undefined identifier `ThisTypeDoesNotExistsAndCrahesTheCompiler` |
| 4 | --- |
| 5 | * https://issues.dlang.org/show_bug.cgi?id=17380 |
| 6 | */ |
| 7 | |
| 8 | struct Int128 |
| 9 | { |
| 10 | Uint128 opCast() |
| 11 | { |
| 12 | return ThisTypeDoesNotExistsAndCrahesTheCompiler; |
| 13 | } |
| 14 | alias opCast this; |
| 15 | } |
| 16 | |
| 17 | struct Uint128 |
| 18 | { |
| 19 | Int128 opCast() { return Int128.init; } |
| 20 | alias opCast this; |
| 21 | } |