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

           Summary: typeof fails when passing delegate as alias parameter
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from deadalnix <[email protected]> 2012-11-10 10:19:48 PST ---
See code below :

class A {
    void foo() {
        new B!(a => visit(a), A)();
    }

    A visit(A a) {
        return a;
    }
}

class B(alias fun, T) {
    T t;
    typeof(fun(t)) result;
}

dmd output typeoffail.d(3): Error: need 'this' to access member visit

However, if typeof(fun(t)) result; is replaced by T result; or A result;
everything work as expected.

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

Reply via email to