[Issue 9999] Integer literal 0 and 1 should prefer integer type in overload resolution

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 28 06:48:34 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9999



--- Comment #8 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-04-28 06:48:32 PDT ---
> Integers do NOT implicitly convert to bool (see comment 5)

You're right. In the general case, they don't, but VPR makes it so that it can
happen (and not necessarily just with literals), whereas if bool were strongly
typed, it would _never_ happen. if and loop conditions are a different beast
entirely, because they invisibly insert explicit casts, which I don't see as a
problem. But I don't think that integral values should ever implicitly convert
to bool or vice versa.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list