November 07, 2009 [Issue 3486] New: [tdpl] Incorrect result type of binary operators applied to typedef'd types | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=3486 Summary: [tdpl] Incorrect result type of binary operators applied to typedef'd types 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:11:09 PST --- unittest { Mass m; Velocity v; pragma(msg, typeof(m * v).stringof); pragma(msg, typeof(v * m).stringof); static assert(is(typeof(m * v) == double)); static assert(is(typeof(v * m) == double)); } Currently the type of m * v is Velocity, and the type of v * m is Mass. The only reasonable type of an operation (if it compiles at all) should be double, obtained after both operands are converted to their supertype. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
November 18, 2009 [Issue 3486] [tdpl] Incorrect result type of binary operators applied to typedef'd types | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | http://d.puremagic.com/issues/show_bug.cgi?id=3486 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:09 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