problem overloading functions with complex enum type
Ali Çehreli via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jul 10 11:01:53 PDT 2017
On 07/08/2017 08:23 AM, Eric wrote:
> enum AS : string[2] { a = ["1","2"], b = ["3","4"] };
> enum BS : string[2] { a = ["5","6"], b = ["7","8"] };
>
> void funcs(AS a) { writeln("AS"); }
> void funcs(BS b) { writeln("BS"); }
> funcs(AS.a); // compiler error: matches both funcs(AS) and funcs(BS)
This looks like a bug to me.
Ali
More information about the Digitalmars-d-learn
mailing list