1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/ice7645.d(28): Error: need 'this' for 't' of type 'char'
5 fail_compilation/ice7645.d(31): Error: need 'this' for 'fn' of type 'pure nothrow @nogc @safe void()'
6 ---
7 */
8 
9 class C
10 {
C2()11     class C2()
12     {
13         char t;
14     }
15 }
16 
17 struct S
18 {
S2S19     struct S2(T)
20     {
21         void fn() {}
22     }
23 }
24 
main()25 void main()
26 {
27     C c;
28     auto v = c.C2!().t;
29 
30     S s;
31     s.S2!int.fn();
32 }
33