http://d.puremagic.com/issues/show_bug.cgi?id=5380
Summary: Subtyping with "alias this" doesn't mix with regular inheritance Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: samu...@voliacable.com --- Comment #0 from Max Samukha <samu...@voliacable.com> 2010-12-27 03:59:11 PST --- class A { } class B { A a; alias a this; } class C : B { } void main() { A a = new C; // error } Error: cannot implicitly convert expression (new C) of type test.C to test.A Since C is a subtype of B (via inheritance) and B is a subtype of A (via "alias this"), C should be implicitly convertible to A. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------