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

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Apr 30 09:44:27 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=9999

Nick Treleaven <nick at geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick at geany.org

--- Comment #15 from Nick Treleaven <nick at geany.org> ---
(In reply to Don from comment #9)
> Implicit conversion from int to bool is indeed rather odd. Do we really need
> it? Initially, literal 0 and 1 sound like acceptable ways of writing 'false'
> and 'true', but constant folding makes it much harder to justify.

https://github.com/dlang/dmd/pull/6404

--


More information about the Digitalmars-d-bugs mailing list