Bug 14745 – Qualifiers rejected for delegate literals
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-06-28T19:11:00Z
Last change time
2015-10-04T18:22:00Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
timon.gehr
Comments
Comment #0 by timon.gehr — 2015-06-28T19:11:03Z
This code is (correctly) accepted by DMD 2.067:
void main(){
auto foo1()pure immutable{ return 0; }
auto foo2()pure const{ return 0; }
}
But this is not:
void main(){
auto dg1=()pure immutable{ return 0; };
auto dg2=()pure const{ return 0; };
}
Both should compile. (There should be no difference in how qualifiers are handled for named and anonymous nested functions.)