Summary: Lookup of non-member not working
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

This code doesn't compile:

struct R
    bool empty();
    ref int front();
    void popFront();

ref int popNext(ref R fwdRange)
    auto result = & fwdRange.front();
    return *result;

void main()
    R r;
    int x = r.popNext;

The code should work: popNext should be looked up in R's outer scope if not a

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

Reply via email to