Bug 21713 – Cannot write trusted desstructor with @system member dtor

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2021-03-14T09:04:05Z
Last change time
2024-12-13T19:15:10Z
Keywords
safe, spec
Assigned to
No Owner
Creator
Tobias Pankrath
Moved to GitHub: dmd#19887 →

Comments

Comment #0 by tobias — 2021-03-14T09:04:05Z
See here: https://run.dlang.io/is/DLtrxB And here: https://gist.github.com/run-dlang/b8eb31340c90c128a12b31a7c7e18804 --- struct Foo { @system ~this() {} } @safe: struct Bar { Foo f; ~this() @trusted {} } @safe: void main() { Bar b; } --- It should be possible to declare that I indeed trust the transitively called @system dtors. You can circumvent that by putting the field into a union and destruct it yourself.
Comment #1 by robert.schadek — 2024-12-13T19:15:10Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19887 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB