]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gdc.test/fail_compilation/checkimports2c.d
ipa-param-manip: Be careful about a reallocating hash_map
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / checkimports2c.d
CommitLineData
928e96bb 1// REQUIRED_ARGS:
b4c522fa
IB
2/*
3TEST_OUTPUT:
4---
928e96bb 5fail_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
11import imports.imp1;
12
13enum X = 0;
14
15class B
16{
17 import imports.imp2;
18 static assert(X == 2); // imp2.X --> .X (information)
19 int[Y] aa; // imp2.Y
20}
21
22class 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}