[Issue 1993] New: Error calling vararg delegate with null

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 14 08:45:03 PDT 2008


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

           Summary: Error calling vararg delegate with null
           Product: D
           Version: 1.028
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: chris at dprogramming.com


Note the comments; the one is causing an error but should work:

void blah(bool delegate(char[][] words ...) callback)
{
        callback("foo", "bar"); // OK
        callback("foo"); // OK
        //callback(null, "bar"); // DMD 1.028: Error: expected 1 arguments, not
2
        callback(cast(char[])null, "bar"); // OK
        callback((char[]).init, "bar"); // OK
}


-- 



More information about the Digitalmars-d-bugs mailing list