http://d.puremagic.com/issues/show_bug.cgi?id=3487
Summary: [tdpl] Covariant returns needed for typedef Product: D Version: unspecified Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: and...@metalanguage.com --- Comment #0 from Andrei Alexandrescu <and...@metalanguage.com> 2009-11-07 10:20:03 PST --- Consider: struct A { A fun() { return A.init; } } typedef A B; void main() { B b; B c = b.fun(); } The return type of a member of A must be automatically cast to B when used through a typedef. This is in order to allow B support the same methods as A. It is also consistent with typedefs of built-in types. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------