☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
diag20059.d
☽
☼
gcc/testsuite/gdc.test/fail_compilation/diag20059.d
code
plain
raw
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/diag20059.d(15): Error: expected return type of `string`, not `string[]`:
5
fail_compilation/diag20059.d(13): Return type of `string` inferred here.
6
---
7
*/
8
9
auto fail()
10
{
11
string ret;
12
if (true)
13
return ret;
14
else
15
return [ret];
16
}