https://d.puremagic.com/issues/show_bug.cgi?id=9618
Denis Shelomovskij <verylonglogin....@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid CC| |verylonglogin....@gmail.com Summary|DMD takes unnecessary route |`alias this` is used insted |to alias this in certain |of implicit upcasting of |situations |other `alias this` target --- Comment #1 from Denis Shelomovskij <verylonglogin....@gmail.com> 2013-11-09 15:29:02 MSK --- Reduced testcase: --- class C { int val; alias val this; } struct S { C c; alias c this; } void main() { C c1 = S(); // ok Object c2 = S().c; // ok Object c3 = S(); // Error: e2ir: cannot cast (new C2).c.val of type int to type main.Base } --- -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------