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.