gcc/testsuite/gdc.test/fail_compilation/fail8313.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail8313.d(13): Error: `fail8313.bar` called with argument types `(int)` matches multiple overloads exactly: |
| 5 | fail_compilation/fail8313.d(11): `fail8313.bar!().bar(int x)` |
| 6 | and: |
| 7 | fail_compilation/fail8313.d(12): `fail8313.bar!().bar(int x)` |
| 8 | fail_compilation/fail8313.d(13): while evaluating: `static assert(bar()(int x)(1))` |
| 9 | --- |
| 10 | */ |
| 11 | auto bar()(int x){return x;} |
| 12 | auto bar()(int x = bar()){return x;} |
| 13 | static assert(bar(1)); |