Comment #0 by matti.niemenmaa+dbugzilla — 2006-11-15T05:49:56Z
Under the "Const Attribute" section, the spec contains code like the following:
class C {
const int a;
const int b;
this() {
a = 3;
b = 2;
}
this(int x)
{
this(); // ok, forwarding constructor
}
}
However, this code does not compile, producing errors:
asdf.d(11): constructor asdf.C.this missing initializer for const field a
asdf.d(11): constructor asdf.C.this missing initializer for const field b
It seems to me that there's no particular reason why this shouldn't work, so I'm tagging this as "rejects-valid" as well as "spec".
Comment #1 by matti.niemenmaa+dbugzilla — 2007-04-21T11:20:43Z
789 is a duplicate of this bug, but as it's the one that's been marked fixed I'll mark this as the duplicate.
*** This bug has been marked as a duplicate of 789 ***