1 // REQUIRED_ARGS: -o- 2 // PERMUTE_ARGS: 3 4 int sx; 5 double sy; 6 7 /* 8 TEST_OUTPUT: 9 --- 10 fail_compilation/fail13336b.d(16): Error: cast(double)sx is not an lvalue 11 --- 12 */ f1(bool f)13ref f1(bool f) 14 { 15 if (f) 16 return sx; 17 return sy; 18 } 19 20 /* 21 TEST_OUTPUT: 22 --- 23 fail_compilation/fail13336b.d(30): Error: cast(double)sx is not an lvalue 24 --- 25 */ f2(bool f)26ref f2(bool f) 27 { 28 if (f) 29 return sy; 30 return sx; 31 } 32