On Wednesday, 17 February 2016 at 02:23:52 UTC, Ali Çehreli wrote:
Since a static array must consist of .init values to begin with, every move into its members must also trigger its destructor if the type has elaborate destructor.

Oof. This strikes me as a "gotcha", that this happens even with @disable this() as opposed to a compiler error. Is this only for static arrays, or are there other places @disable this() is silently ignored?

This is what I've discovered:

Ok, I think that pretty much explains the behavior I was seeing in the reduced case. Thanks -- that's helpful to know!

The downside is that it really indicates that I didn't reduce my buggy program properly. I'll hold out for the live-object-destructor-call fix to see whether that corrects my problem; I can just leak resources until then :).


Reply via email to