[Issue 10962] Wrong implicit conversion of enum in const function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 12 21:13:12 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=10962
yebblies <yebblies at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yebblies at gmail.com
--- Comment #1 from yebblies <yebblies at gmail.com> 2013-11-13 16:13:11 EST ---
Because E.init has type E and e1 has type const(E), it misses the
t1->equals(t2) condition in CondExp::semantic, and goes to typeMerge, which
calls toBaseType on both, giving short, which it then promotes to int.
CondExp::semantic and/or typeMerge need to be fixed to prefer const conversion
over promotion.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list