Bug 1320 – Attributes spec uses 1.0 const semantics in 2.0 section

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2007-07-06T04:15:00Z
Last change time
2014-02-13T19:08:44Z
Keywords
spec
Assigned to
bugzilla
Creator
dlang-bugzilla

Comments

Comment #0 by dlang-bugzilla — 2007-07-06T04:15:41Z
In http://digitalmars.com/d/attribute.html#const we have (some parts skipped): const int x; static this() { x = 3; // ok } // --- class C { const int a; this() { a = 3; // ok } } However, none of this code works with any 2.0 compiler for me.
Comment #1 by bugzilla — 2007-07-06T11:23:39Z
That's as designed. Use 'final' for delayed initialization.
Comment #2 by matti.niemenmaa+dbugzilla — 2007-07-06T11:27:04Z
Then it's a documentation issue. The 2.0 section shouldn't use code which only works in 1.0.
Comment #3 by bugzilla — 2007-07-30T15:50:01Z
Fixed DMD 2.003