Comment #0 by alphaglosined — 2023-07-30T22:42:03Z
When the destructor is marked scope, but member fields of a struct are a struct and have a destructor that is not marked scope, provide the reasons why it isn't callable.
```d
@safe:
void accept(scope Wrapper wrapper) {
}
struct Wrapper
{
private Data data;
@safe:
this(return scope ref Wrapper other) scope
{
this.tupleof = other.tupleof;
}
~this() scope
{
}
}
struct Data
{
void* x;
@safe:
this(return scope ref Data other) scope
{
this.tupleof = other.tupleof;
}
~this()
{
}
}
```
Output:
```
onlineapp.d(3): Error: scope variable `wrapper` assigned to non-scope parameter `this` calling `~this`
onlineapp.d(18): which is assigned to non-scope parameter `this`
```
Comment #1 by robert.schadek — 2024-12-13T19:30:18Z