MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag15209.d
blobbd6d723437e8973eaea30aeb4c337cba27ce52ff
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag15209.d(18): Error: accessing non-static variable `x` requires an instance of `C1`
5 fail_compilation/diag15209.d(21): Error: accessing non-static variable `x` requires an instance of `S2`
6 ---
7 */
9 class C1 { int x; }
10 struct S1 { alias y = C1.x; }
12 struct S2 { int x; }
13 class C2 { alias y = S2.x; }
15 void main()
17 S1 s1;
18 s1.y = 10; // invalid field variable access
20 auto c2 = new C2();
21 c2.y = 10; // invalid field variable access