https://issues.dlang.org/show_bug.cgi?id=13119
Stanislav Blinov <stanislav.bli...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stanislav.bli...@gmail.com --- Comment #1 from Stanislav Blinov <stanislav.bli...@gmail.com> --- Error in the original report is trivially worked around by replacing `s = S(0)` with `s = 0` as that is supported by S's constructor. However, the error comes back as soon as more than one argument gets involved: struct S { this(int, int) @safe pure nothrow @nogc { } ~this() { } } struct T { S s; this(int) @safe pure nothrow @nogc { s = S(0, 1); // attribute errors here as this is introducing a dtor call } } Two workarounds: alias AliasSeq(T...) = T; s = AliasSeq!(0, 1); // works for literals, not for moving stuff import core.lifetime : forward; s = forward!args; // works for moving and copying, but not for literals Observation about `nothrow` not being looked at is still valid. Initialization shouldn't require a destructor call, as right hand side should ostensibly be constructed at &s, should it not? --