Always false float comparisons

Nordlöw via Digitalmars-d digitalmars-d at puremagic.com
Thu May 12 02:28:33 PDT 2016


On Thursday, 12 May 2016 at 09:22:02 UTC, Nordlöw wrote:
>>> "Comparison is always false: literal 1000 is not representable
>>> as 'byte'"
>
> What's wrong with having this warning?

This is, IMO, just a more informative diagnostic than:

"Statement at `foo()` is not reachable":

in the following code:

     if (b == 1000)
     {
         foo();
     }



More information about the Digitalmars-d mailing list