1 /* 2 TEST_OUTPUT: 3 --- 4 fail_compilation/fail8217.d(22): Error: this for foo needs to be type D not type fail8217.D.C 5 --- 6 */ 7 8 class D 9 { 10 int x; bar()11 template bar() 12 { 13 int foo() 14 { 15 return x; 16 } 17 } 18 static class C 19 { foo()20 int foo() 21 { 22 return bar!().foo(); 23 } 24 } 25 } 26