[Issue 22966] Inconsistent `shared` attribute for generated destructor
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 1 12:26:09 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22966
--- Comment #1 from kinke <kinke at gmx.net> ---
Trying to work around this with an explicit dummy ctor does NOT work:
```
struct WithDtor {
int x;
~this() {}
}
struct A {
WithDtor withDtor;
~this() shared {}
}
struct B {
version (Shared)
shared A a;
else
A a;
}
void main() {
pragma(msg, A.__xdtor.mangleof);
}
```
```
$ dmd -o- foo.d
_D3mod1A10__aggrDtorMFZv
$ dmd -o- foo.d -version=Shared
_D3mod1A10__aggrDtorMOFZv
```
--
More information about the Digitalmars-d-bugs
mailing list