Implicit casting of int enum members to int

Mike B Johnson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jun 4 18:23:22 PDT 2017


On Monday, 3 October 2016 at 09:21:37 UTC, Jonathan M Davis wrote:
> [...]

Is this bug ever going to be fixed?

I can't do

enum X : Y
{
    a = 1
}

because 1 is not implicitly convertible to Y, even though Y is 
aliased to an int so it should be.


More information about the Digitalmars-d-learn mailing list