gcc/testsuite/gdc.test/fail_compilation/diag13320.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/diag13320.d(14): Error: operator `++` not supported for `f` of type `Foo` |
| 5 | fail_compilation/diag13320.d(9): perhaps implement `auto opUnary(string op : "++")() {}` or `auto opOpAssign(string op : "+")(int) {}` |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | struct Foo {} |
| 10 | |
| 11 | void main() |
| 12 | { |
| 13 | Foo f; |
| 14 | ++f; |
| 15 | } |