[Issue 7061] New: delegates sometimes cannot be used in struct initializers
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Dec 3 06:28:52 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7061
Summary: delegates sometimes cannot be used in struct
initializers
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: timon.gehr at gmx.ch
--- Comment #0 from timon.gehr at gmx.ch 2011-12-03 06:27:46 PST ---
S a = {{}}; // fail
S b = {{;}}; // fail
S c = {{x=0;}}; // fail
T d = {{return 0;}}; // fail
void main(){
S x = {{}}; // ok
S y = {{;}}; // fail
S z = {{x=0;}}; // fail
T w = {{return 0;}}; // fail
}
The program should compile. The inconsistency between x and y suggests that the
issue is partly related to the parser.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list