| 1 |
/* |
| 2 |
EXTRA_FILES: imports/imp1.d imports/imp2.d |
| 3 |
TEST_OUTPUT: |
| 4 |
--- |
| 5 |
fail_compilation/lookup.d(24): Error: no property `X` for type `lookup.B`, did you mean `imports.imp2.X`? |
| 6 |
fail_compilation/lookup.d(24): while evaluating: `static assert((B).X == 0)` |
| 7 |
fail_compilation/lookup.d(25): Error: no property `Y` for type `lookup.B`, did you mean `imports.imp2.Y`? |
| 8 |
fail_compilation/lookup.d(25): while evaluating: `static assert((B).Y == 2)` |
| 9 |
--- |
| 10 |
*/ |
| 11 |
|
| 12 |
import imports.imp1; |
| 13 |
|
| 14 |
enum X = 0; |
| 15 |
|
| 16 |
class B |
| 17 |
{ |
| 18 |
import imports.imp2; |
| 19 |
static assert(X == 0); |
| 20 |
static assert(Y == 2); |
| 21 |
} |
| 22 |
class C : B |
| 23 |
{ |
| 24 |
static assert(B.X == 0); |
| 25 |
static assert(B.Y == 2); |
| 26 |
|
| 27 |
static assert(X == 0); |
| 28 |
static assert(Y == 1); |
| 29 |
} |