d: Merge upstream dmd ff57fec515, druntime ff57fec515, phobos 17bafda79.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail13336b.d
blobf8959a2183c229dfb406c410e579c4e7398cc3da
1 // REQUIRED_ARGS: -o-
3 int sx;
4 double sy;
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 ---
13 ref f1(bool f)
15 if (f)
16 return sx;
17 return sy;
20 ref f2(bool f)
22 if (f)
23 return sy;
24 return sx;