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 ff57fec515, druntime ff57fec515, phobos 17bafda79.
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
fail13336b.d
blob
f8959a2183c229dfb406c410e579c4e7398cc3da
1
// REQUIRED_ARGS: -o-
2
3
int
sx
;
4
double
sy
;
5
6
/*
7
TEST_OUTPUT:
8
---
9
fail_compilation/fail13336b.d(16): Error: cannot `ref` return expression `cast(double)sx` because it is not an lvalue
10
fail_compilation/fail13336b.d(24): Error: cannot `ref` return expression `cast(double)sx` because it is not an lvalue
11
---
12
*/
13
ref
f1
(
bool
f
)
14
{
15
if
(
f
)
16
return
sx
;
17
return
sy
;
18
}
19
20
ref
f2
(
bool
f
)
21
{
22
if
(
f
)
23
return
sy
;
24
return
sx
;
25
}