Closed dkorpel closed 1 year ago
However I don't get the rules behind it, do you maybe want to add a warning case or open an issue for it on dscanner?
The rule is: return scope
together means you can return pointers through this
, and return
without scope
directly after it means you can return &this
(or this
by ref
).
I don't know how dscanner is supposed to warn about this. You could implement limited escape checking in dscanner, but that simply checks what the compiler already checks with more accuracy.
@WebFreak001 Buildkite builds the latest tag v0.16.20, can you add a new tag so it sees this fix?
Ping
tagged
Blocking https://github.com/dlang/dmd/pull/14891