d: Merge upstream dmd ff57fec515, druntime ff57fec515, phobos 17bafda79.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag4596.d
blobd43342bdc581379251fec1b2747e22847e5fab7a
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag4596.d(15): Error: cannot modify expression `this` because it is not an lvalue
5 fail_compilation/diag4596.d(16): Error: conditional expression `1 ? this : this` is not a modifiable lvalue
6 fail_compilation/diag4596.d(18): Error: cannot modify expression `super` because it is not an lvalue
7 fail_compilation/diag4596.d(19): Error: conditional expression `1 ? super : super` is not a modifiable lvalue
8 ---
9 */
11 class NoGo4596
13 void fun()
15 this = new NoGo4596;
16 (1?this:this) = new NoGo4596;
18 super = new Object;
19 (1?super:super) = new Object;