Bug 11661 – Meaningless error: "a struct is not a valid initializer for a void function()"
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-01T18:09:00Z
Last change time
2013-12-02T17:11:08Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2013-12-01T18:09:48Z
This code should work, but doesn't.
void main()
{
void delegate() dg = {}; // OK
void function() fp = {}; // NG
}
test.d(4): Error: a struct is not a valid initializer for a void function()