[Issue 19399] Different Conversion Rules for Same Value and Type -- Enum

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 14 12:25:09 UTC 2018


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

Simon Naarmann <eiderdaus at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eiderdaus at gmail.com

--- Comment #1 from Simon Naarmann <eiderdaus at gmail.com> ---
This looks like not-a-bug to me: VRP examines literals (A.a) and concludes that
A.a fits in a byte. But VRP will not deduce from the code flow that v contains
some value that fits in a byte.

The line `b = 128,` can be removed, the example will produce the same output
then on DMD64 D Compiler v2.083.0: The literal A.a goes to foo(byte) and A v
goes to foo(int) even when v == A.a.

--


More information about the Digitalmars-d-bugs mailing list