[Issue 22680] New: @safe hole with destructors
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jan 16 19:58:40 UTC 2022
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: nobody at puremagic.com
Reporter: elronnd at elronnd.net
C c;
class C {
~this() @safe {
c = this;
}
}
This is accepted, but is unsafe.
I propose that destructors always be marked as 'scope'.
--
More information about the Digitalmars-d-bugs
mailing list