]>
Commit | Line | Data |
---|---|---|
928e96bb | 1 | // REQUIRED_ARGS: |
b4c522fa IB |
2 | /* |
3 | TEST_OUTPUT: | |
4 | --- | |
928e96bb | 5 | fail_compilation/checkimports2c.d(18): Error: static assert: `0 == 2` is false |
b4c522fa IB |
6 | --- |
7 | */ | |
8 | ||
9 | // old lookup + information (the order of switches is reverse) | |
10 | ||
11 | import imports.imp1; | |
12 | ||
13 | enum X = 0; | |
14 | ||
15 | class B | |
16 | { | |
17 | import imports.imp2; | |
18 | static assert(X == 2); // imp2.X --> .X (information) | |
19 | int[Y] aa; // imp2.Y | |
20 | } | |
21 | ||
22 | class C : B | |
23 | { | |
24 | static assert(B.X == 2); // imp2.X --> error (keep old lookup rule) | |
25 | static assert(B.Y == 2); // imp2.Y --> error (keep old lookup rule) | |
26 | ||
27 | static assert(X == 2); // imp2.X --> .X (information) | |
28 | static assert(Y == 2); // imp2.Y --> imp1.Y (information) | |
29 | } |