Summary: Bad codegen when passing fields as template alias
           Product: D
           Version: D2
          Platform: x86
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Vladimir Panteleev <> 2011-09-21 
02:22:48 PDT ---
I'm not sure if this is valid code, so it's either accepts-invalid or
I was trying to implement member field pointers, when I ran into this:

int func(alias F)(int i)
    return i;

class C
    int a;

void main()
    auto a = &func!(C.a);
    assert(a(5) == 5);
    //auto i = func!(C.a)(5); // uncomment for a weird compiler error

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to