On Mon, 17 May 2010 15:31:23 -0400, bearophile <bearophileh...@lycos.com>
wrote:
Steven Schveighoffer:
Unlike some languages, D1 const does not imply static. Which means you
are trying to define an S as containing an S, which would then contain
another S and so on.
It seems the const implies static, in structs... I don't know if this is
by design, or it's a compiler bug, or something. I don't understand.
This doesn't asserts:
struct Foo {
float value;
const Foo f = Foo();
}
void main() {
assert(Foo.sizeof == 4);
}
This looks like a compiler bug that I can add it to bugzilla.
No, I was simply wrong :) I think it's by design. Which means the
original bug report is valid.
-Steve