Bug in function parameters type matching
EntangledQuanta via Digitalmars-d
digitalmars-d at puremagic.com
Sat Sep 9 17:40:50 PDT 2017
On Saturday, 9 September 2017 at 21:27:14 UTC, Adam D. Ruppe
wrote:
> On Saturday, 9 September 2017 at 21:15:10 UTC, EntangledQuanta
> wrote:
>> What's the point then of even having an enum parameter?
>
> You must pass the enum to the enum parameter. Implicit casting
> only goes one way.
>
> You are just also allowed to pass the enum to an int parameter.
I think it should be only implicitly castable if you explicitly
set the type on the enum.
Surely you see how semantically wrong calling foo in the last
examples I gave?
More information about the Digitalmars-d
mailing list