Invariant for default construction
Martin Nowak via Digitalmars-d
digitalmars-d at puremagic.com
Mon Nov 17 22:10:23 PST 2014
On Tuesday, 18 November 2014 at 00:51:03 UTC, deadalnix wrote:
> On Monday, 17 November 2014 at 20:02:36 UTC, Martin Nowak wrote:
>> Walter is about to fix an old bug [1] so that invariants are
>> now called before destruction and for non-default construction.
>>
>> A remaining question is whether invariants should also be
>> called for default construction [2].
>>
>> [1]: https://github.com/D-Programming-Language/dmd/pull/4136
>> [2]: https://issues.dlang.org/show_bug.cgi?id=519#c11
>
> Solution obviously being to have default constructor and to run
> the invariant after default construction.
We do have them for classes.
More information about the Digitalmars-d
mailing list