[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 08:42:56 PDT 2015


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

--- Comment #23 from Dicebot <public at dicebot.lv> ---
(In reply to Jonathan M Davis from comment #22)
> I think that allowing an implicit conversion to be used with a ref parameter
> is a clear violation of the type system. If we want to fix it via
> deprecation rather than immediately making it an error like we'd normally do
> with an "accepts-invalid" bug on the theory that the code actually works in
> spite of violating the type system, then fine. But I don't think that it's
> at all a good idea to leave the code as valid long term.

This was my point from the very first comment here ;) Yes, this is bad code and
disallowing it will make type system more uniform. But it isn't inherently
broken and thus deprecation stage is mandatory.

I will look into relevant code closer to the weekend if no one else will have
done it by that point.

--


More information about the Digitalmars-d-bugs mailing list