[Issue 3235] New: Function literals must be deduced as "function" or "delegate"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 8 07:16:08 PDT 2009


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


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:


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: -------

More information about the Digitalmars-d-bugs mailing list