https://issues.dlang.org/show_bug.cgi?id=16949
Issue ID: 16949 Summary: [Reg 2.073] confusing @safe error message for fields with unsafe destructors Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: diagnostic Severity: regression Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: c...@dawg.eu cat > bug.d << CODE struct A { ~this(){} } @safe struct B { A a; } CODE dmd -c bug -transition=safe ---- Error: cannot take address of parameter this in @safe function ~this ---- This should have been a deprecation instead of an error hidden by -transition=safe, hence it's a diagnostic regression. Also missing the line number btw. The original useful error message was. ---- bug.d(6): Error: @safe destructor 'bug.B.~this' cannot call @system destructor 'bug.A.~this' ---- --