Example program: --- struct Inner { @system ~this() {} } struct Outer { Inner inner; @safe ~this() {} } @safe void main() { Outer outer; } --- Output when compiled with DMD v2.093.1: --- onlineapp.d(14): Error: @safe function D main cannot call @system destructor onlineapp.Outer.~this onlineapp.d(9): onlineapp.Outer.~this is declared here --- The error message incorrectly states that Outer.~this is @system, even though it is @safe. The actual problem is that Inner.~this is @system.
Turns out this is already fixed in 2.094.0.