Thread overview |
---|
October 13, 2007 [Issue 1578] New: const initializer rejected | ||||
---|---|---|---|---|
| ||||
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]; -- |
October 13, 2007 [Issue 1578] const initializer rejected | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | 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 ------- Comment #1 from matti.niemenmaa+dbugzilla@iki.fi 2007-10-13 08:21 ------- 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 -- |
September 27, 2012 [Issue 1578] Allow AA literals to initialize static variables | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | 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 --- Comment #2 from Don <clugdbug@yahoo.com.au> 2012-09-27 01:14:26 PDT --- 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: ------- |
Copyright © 1999-2021 by the D Language Foundation