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

           Summary: alias this and opDispatch
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: pelle.mans...@gmail.com


--- Comment #0 from Pelle M´┐Żnsson <pelle.mans...@gmail.com> 2010-05-23 03:07:15 
PDT ---
This structure:

struct A(T) {
    T[string] table;

    alias table this;

    T opDispatch(string s)() {
        return table[s];
    }
}

void main() {
    A!int a;

    a["i"] = 4;

    writeln(a.i);
}

Gives the error:

test.d(56): Error: undefined identifier module test.i

I expected a.i to go to opDispatch when i was not found otherwise.

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

Reply via email to