[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 11:37:09 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14269
--- Comment #24 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(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.
class C {}
void foo(Object o);
void main()
{
C c = new C;
foo(c); // works, and passed by ref!
}
I think clearly there is a similar relationship with enums and their base type.
--
More information about the Digitalmars-d-bugs
mailing list