]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/lookup.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / lookup.d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/lookup.d(23): Error: no property 'X' for type 'lookup.B'
5 fail_compilation/lookup.d(23): while evaluating: `static assert((B).X == 0)`
6 fail_compilation/lookup.d(24): Error: no property 'Y' for type 'lookup.B'
7 fail_compilation/lookup.d(24): while evaluating: `static assert((B).Y == 2)`
8 ---
9 */
10
11 import imports.imp1;
12
13 enum X = 0;
14
15 class B
16 {
17 import imports.imp2;
18 static assert(X == 0);
19 static assert(Y == 2);
20 }
21 class C : B
22 {
23 static assert(B.X == 0);
24 static assert(B.Y == 2);
25
26 static assert(X == 0);
27 static assert(Y == 1);
28 }