Three legitimate bugs? (D1.061)

Steven Schveighoffer schveiguy at yahoo.com
Mon May 17 13:25:12 PDT 2010


On Mon, 17 May 2010 15:31:23 -0400, bearophile <bearophileHUGS at 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


More information about the Digitalmars-d-learn mailing list