https://issues.dlang.org/show_bug.cgi?id=22094

          Issue ID: 22094
           Summary: Static members are not accessible via  'alias this'
                    inside the subtype
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

struct S {
static:

    void foo() {
    }
}

struct S2 {
static:

    alias s = S;
    alias s this;

    void bar() {
        foo; // fails, should pass
    }
}

void main() {
    S2.foo; // passes as expected
}

onlineapp.d(11): Error: undefined identifier `foo`

--

Reply via email to