[Issue 12209] New: Unable to take address of function nested function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 19 19:58:55 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12209

           Summary: Unable to take address of function nested function
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: lt.infiltrator at gmail.com


--- Comment #0 from Infiltrator <lt.infiltrator at gmail.com> 2014-02-19 19:58:53 PST ---
----------------------------------------------------------
import std.functional : curry;

class S {
    this(S delegate()) { }
}

void main() {
    S fun(int foo) {
        auto ret = new S(&curry!(gun, foo));
        return ret;
    }

    S gun(int foo) {
        auto ret = new S(&curry!(fun, foo));
        return ret;
    };
}
---------------------------------------------------------
Fails to compile:

/d607/f459.d(9): Error: undefined identifier gun, did you mean function fun?
/d607/f459.d(9): Error: no constructor for S

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


More information about the Digitalmars-d-bugs mailing list