| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/ice14642.d(48): Error: undefined identifier `errorValue` |
| 5 |
fail_compilation/ice14642.d(52): error on member `ice14642.Z.v` |
| 6 |
fail_compilation/ice14642.d(24): Error: template instance `ice14642.X.NA!()` error instantiating |
| 7 |
--- |
| 8 |
*/ |
| 9 |
|
| 10 |
alias TypeTuple(T...) = T; |
| 11 |
|
| 12 |
struct X |
| 13 |
{ |
| 14 |
static struct NA() |
| 15 |
{ |
| 16 |
X x; |
| 17 |
|
| 18 |
void check() |
| 19 |
{ |
| 20 |
x.func(); |
| 21 |
} |
| 22 |
} |
| 23 |
|
| 24 |
alias na = NA!(); |
| 25 |
|
| 26 |
auto func() |
| 27 |
{ |
| 28 |
Y* p; |
| 29 |
p.func(); |
| 30 |
} |
| 31 |
} |
| 32 |
|
| 33 |
struct Y |
| 34 |
{ |
| 35 |
mixin Mix; |
| 36 |
} |
| 37 |
|
| 38 |
template Mix() |
| 39 |
{ |
| 40 |
void func() |
| 41 |
{ |
| 42 |
auto z = Z(null); |
| 43 |
} |
| 44 |
} |
| 45 |
|
| 46 |
struct Type(size_t v) {} |
| 47 |
|
| 48 |
enum errVal = errorValue; |
| 49 |
|
| 50 |
struct Z |
| 51 |
{ |
| 52 |
Type!errVal v; |
| 53 |
} |