Bug 157 – "Unexpected FunExp type" error on function literals

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2006-05-27T07:42:00Z
Last change time
2015-06-09T05:15:00Z
Keywords
rejects-valid
Assigned to
dvdfrdmn
Creator
dvdfrdmn

Attachments

IDFilenameSummaryContent-TypeSize
11d-glue.cc.patchPatchtext/plain506

Comments

Comment #0 by dvdfrdmn — 2006-05-27T07:42:48Z
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); }
Comment #1 by dvdfrdmn — 2006-05-27T07:56:19Z
Created attachment 11 Patch Patch for missed case FuncExp::toElem