A purity change

Maxim Fomin maxim at maxim-fomin.ru
Thu Jul 11 11:28:16 PDT 2013


On Thursday, 11 July 2013 at 18:03:14 UTC, bearophile wrote:
> Maxim Fomin:
>
>> My guess is that before 2.063 immutable int y was implicitly 
>> static,
>
> Yet, in the code I used to initialize y in the normal 
> constructor of Foo. If now I tag y as static, that's not 
> possible any more (Error: can only initialize static const 
> member scale inside static constructor), so I don't understand 
> again.
>
> Bye,
> bearophile

The reason it worked in normal constructor prior the change was 
probably the same bug.
This docs covers the issue - 
http://dlang.org/changelog.html#staticfields


More information about the Digitalmars-d-learn mailing list