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