Bug 13879 – Default inizialization of function pointers array
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-12-20T02:04:00Z
Last change time
2015-01-20T08:30:17Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2014-12-20T02:04:17Z
The default-inizialization of an array of function pointers has problems:
void main() {
bool function(int)[2] funcs1 = (int x) => true; // OK
funcs1[0] = x => true; // OK
bool function(int)[2] funcs2 = x => true; // Error
}
dmd 2.067alpha gives:
test.d(4,36): Error: template lambda has no value