repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
diag20059.d
blob
2c8063a243011b95b460963689a4bf62b26ae507
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
}