Comment #0 by alphaglosined — 2023-05-11T15:00:53Z
Adding a destructor to an otherwise DIP1000 scope aware struct stops scope automatic inference when used in an expression and passed to say a function.
Known for frontend 2.102.
Output with destructor: <source>(12): Error: scope variable `input` assigned to non-scope `Test(null)`
```d
struct Test {
string val;
this(return scope string val) scope @safe {
}
~this() scope @safe {
}
}
void giver(scope string input) @safe {
accepts(Test(input));
}
void accepts(scope Test test) @safe {
}
```