On 4/29/14, 10:18 AM, Kenji Hara via Digitalmars-d wrote:
In future release, non-static const or immutable field will be made an
instance field.

struct S
{
     immutable int x = 1;
}
static assert(S.sizeof == int.sizeof);   // will succeed in the future

So current "implicit static" behavior is now deprecated.

Related:
http://dlang.org/changelog#staticfields
http://dlang.org/changelog#staticfields2

Kenji Hara

That makes sense - thanks Nick and Kenji! -- Andrei

Reply via email to