[Issue 17639] Implicit conversion of bool to float should be rejected

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jul 14 19:49:13 PDT 2017


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

Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
             Status|RESOLVED                    |REOPENED
          Component|phobos                      |dmd
           Hardware|x86_64                      |All
         Resolution|INVALID                     |---
            Summary|std.math.approxEqual        |Implicit conversion of bool
                   |accepts return of isNaN     |to float should be rejected
                   |(bool) as argument          |
                 OS|Linux                       |All

--- Comment #2 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
(In reply to Simen Kjaeraas from comment #1)
> This bug report basically boils down to this code:
> 
> float f = false;

That doesn't make sense and doesn't seem useful, so let's reopen it as an
accepts-invalid.

--


More information about the Digitalmars-d-bugs mailing list