[Issue 14269] Enum is not implicitly converted to base type when using ref

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Mar 12 13:14:56 PDT 2015


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

--- Comment #32 from Andrei Alexandrescu <andrei at erdani.com> ---
(In reply to Steven Schveighoffer from comment #31)
> (In reply to Andrei Alexandrescu from comment #30)
> > This is a simple "accepts-wrong-code" bug that needs to be fixed with no
> > deprecation. Any code that relies on this bug was wrong.
> 
> I don't know if this makes things clear. What should be wrong code? The
> situation in the unreleased compiler or the situation in 2.066.1?

Code that attempts to convert an lvalue of enum type to a ref to its base type
is wrong. The compiler shouldn't accept it. Correcting it qualifies as a simple
bug fix.

--


More information about the Digitalmars-d-bugs mailing list