digitalmars.D.bugs - [Issue 1578] New: const initializer rejected
- d-bugmail puremagic.com (22/22) Oct 13 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1578
- d-bugmail puremagic.com (14/14) Oct 13 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1578
- d-bugmail puremagic.com (15/15) Sep 27 2012 http://d.puremagic.com/issues/show_bug.cgi?id=1578
http://d.puremagic.com/issues/show_bug.cgi?id=1578 Summary: const initializer rejected Product: D Version: 1.022 Platform: PC OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: davidl 126.com const MTBit8 = 1; const MTBit16 = 2; const MTBit32 = 3; const MTBit64 = 4; const MTBit80 = 4; const MTBit128 = 5; static int sizemap[int]=[0:0,MTBit8:byte.sizeof, MTBit16:int.sizeof, MTBit32:8, MTBit64:long.sizeof, MTBit80:16]; --
Oct 13 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1578 matti.niemenmaa+dbugzilla iki.fi changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement Keywords|rejects-valid | OS/Version|Windows |All Platform|PC |All Version|1.022 |1.014 ------- This is documented, and hence an enhancement request: "An AssocArrayLiteral cannot be used to statically initialize anything." http://www.digitalmars.com/d/1.0/expression.html#AssocArrayLiteral --
Oct 13 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1578 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clugdbug yahoo.com.au Version|1.014 |D2 Summary|const initializer rejected |Allow AA literals to | |initialize static variables Reduced test case: static int sizemap[int]= [0:0, 1:1, 2:4, 3:8, 4:8, 4:16]; changed title from "const initializer rejected". -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 27 2012