summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/fail13498.d
blob: 27f47b3f7abd3f06512681e9c435e8f94cf8c698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
TEST_OUTPUT:
---
fail_compilation/fail13498.d(11): Error: cannot implicitly convert expression `"foo"` of type `string` to `int`
fail_compilation/fail13498.d(16): Error: template instance `fail13498.foo!()` error instantiating
---
*/

int foo()()
{
    return "foo"; // should fail as well
}

void main()
{
    foo();
}