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

           Summary: Function literals must be deduced as "function" or
                    "delegate"
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: and...@metalanguage.com


Consider:

void foo(alias pred)() {
    pragma(msg, pred.stringof);
}

unittest {
    foo!((i) { return i < 0; })();
    int z = 1;
    foo!((i) { return i < z; })();
}

void main(string[] args)
{
}

This outputs:

__funcliteral1(__T2)
__dgliteral3(__T4)

because the first literal does not have to be a delegate.

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

Reply via email to