November 07, 2009 [Issue 3487] New: [tdpl] Covariant returns needed for typedef | ||||
---|---|---|---|---|
| ||||
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: nobody@puremagic.com ReportedBy: andrei@metalanguage.com --- Comment #0 from Andrei Alexandrescu <andrei@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: ------- |
November 18, 2009 [Issue 3487] [tdpl] Covariant returns needed for typedef | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | http://d.puremagic.com/issues/show_bug.cgi?id=3487 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla@digitalmars.com Resolution| |WONTFIX --- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2009-11-18 10:54:33 PST --- Dropping typedef, so won't fix. -- 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