http://d.puremagic.com/issues/show_bug.cgi?id=6557



--- Comment #1 from Kenji Hara <k.hara...@gmail.com> 2011-08-26 05:14:00 PDT ---
> void foo(enum {a, b} arg) {
>     if (arg == b) {}
>     if (arg == foo.a) {} // alternative syntax
> }

I have one question.
In following case, what does foo receive as arg?

void main()
{
    typeof(foo.a) E;
    E a = foo.b;
    foo(a);   // == foo(foo.a) or foo(foo.b) ?
}

I think the enum scope inference from their member name is nearly impossible,
because D has template function.
The feature requires a function signature to determine the argument types, but
template function call requires argument types to determine the function
signature!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to