gcc/testsuite/gdc.test/fail_compilation/fail20.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail20.d(17): Error: no operator `<` for type `FOO` |
| 5 | fail_compilation/fail20.d(11): perhaps overload it with `int opCmp(FOO other) const {}` |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | // ICE(cod3) DMD0.080 |
| 10 | |
| 11 | struct FOO{} |
| 12 | |
| 13 | void main() |
| 14 | { |
| 15 | FOO one; |
| 16 | FOO two; |
| 17 | if (one < two){} // This should tell me that there |
| 18 | // is no opCmp() defined instead |
| 19 | // of crashing. |
| 20 | } |