Summary: alias this and opDispatch
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Pelle M´┐Żnsson <> 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;


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:
------- You are receiving this mail because: -------

Reply via email to