1 /* 2 TEST_OUTPUT: 3 --- 4 fail_compilation/fail192.d(15): Error: outer function context of fail192.foo is needed to 'new' nested class fail192.foo.DummyClass 5 fail_compilation/fail192.d(26): Error: template instance fail192.X!(DummyClass) error instantiating 6 --- 7 */ 8 9 // 1336 Internal error when trying to construct a class declared within a unittest from a templated class. 10 X(T)11class X(T) 12 { 13 void bar() 14 { 15 auto t = new T; 16 } 17 } 18 foo()19void foo() 20 { 21 class DummyClass 22 { 23 } 24 25 //auto x = new X!(DummyClass); 26 X!(DummyClass) x; 27 } 28