[Bug 157] New: "Unexpected FunExp type" error on function literals

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 27 05:42:50 PDT 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=157

           Summary: "Unexpected FunExp type" error on function literals
           Product: GDC
           Version: 0.18
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn at users.sf.net
        ReportedBy: dvdfrdmn at users.sf.net


The following code fails with the error message:

int function(int)[1] table;

void main() {
    table[0] = function int(int x) { return x + 99; };
    assert(table[0](1) == 100);
}


-- 




More information about the D.gnu mailing list