[Issue 6557] Inplace enum literals

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 27 05:06:38 PDT 2011


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



--- Comment #3 from bearophile_hugs at eml.cc 2011-08-27 05:06:36 PDT ---
(In reply to comment #1)

> 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!

Do you mean this problem?

void foo(T)(T x, enum : T { A, B }) {}
void main() {
    typeof(foo.A) a = foo.B;
    foo(a);
}

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


More information about the Digitalmars-d-bugs mailing list