https://issues.dlang.org/show_bug.cgi?id=22680
Issue ID: 22680
Summary: @safe hole with destructors
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
C c;
class C {
~this() @safe {
c = this;
}
}
This is accepted, but is unsafe.
I propose that destructors always be marked as 'scope'.
--
