On Monday, 22 May 2017 at 00:36:24 UTC, Stanislav Blinov wrote:
I can't think of any case where you'd want preconditions on destructor when the object is in .init state.
I think we're actually saying the same thing: I mean the destructor must be callable on .init so you might do like
struct Foo { int* ptr; ~this() { // might be called with ptr is null cuz of .init // so wanna check if(ptr !is null) free(ptr); } }