December 17, 2009 [Issue 3623] New: Cannot mixin templated classes with inner classes | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=3623 Summary: Cannot mixin templated classes with inner classes Product: D Version: 1.050 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: mike.linford.reg@gmail.com --- Comment #0 from mike.linford.reg@gmail.com 2009-12-16 20:45:19 PST --- 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 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation