The following does not compile (with -version=broken): class A(T) { version(broken) { class B { T blah() { return t; } } } T t; } mixin A!(int); int main() { A!(int) a = new A!(int)(); return 0; } and gives the errors: Error: this for t needs to be type A not type test2.A!(int).A Error: class test2.A!(int).A member t is not accessible Error: template instance test2.A!(int) error instantiating However, it does compile if B.blah() is changed to: return this.outer.t
Works as of 2.065.0. Fixed by https://github.com/D-Programming-Language/dmd/pull/3019