December 03, 2011 [Issue 7061] New: delegates sometimes cannot be used in struct initializers | ||||
---|---|---|---|---|
| ||||
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@puremagic.com ReportedBy: timon.gehr@gmx.ch --- Comment #0 from timon.gehr@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: ------- |
Copyright © 1999-2021 by the D Language Foundation