gcc/testsuite/gdc.test/fail_compilation/fail13498.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail13498.d(11): Error: return value `"foo"` of type `string` does not match return type `int`, and cannot be implicitly converted |
| 5 | fail_compilation/fail13498.d(16): Error: template instance `fail13498.foo!()` error instantiating |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | int foo()() |
| 10 | { |
| 11 | return "foo"; // should fail as well |
| 12 | } |
| 13 | |
| 14 | void main() |
| 15 | { |
| 16 | foo(); |
| 17 | } |