dlang / ddox

Advanced D documentation engine
MIT License
62 stars 20 forks source link

Fix return ref in issue180_return test #235

Closed dkorpel closed 1 year ago

dkorpel commented 1 year ago

Blocking https://github.com/dlang/dmd/pull/14891

dkorpel commented 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.

dkorpel commented 1 year ago

@WebFreak001 Buildkite builds the latest tag v0.16.20, can you add a new tag so it sees this fix?

dkorpel commented 1 year ago

Ping

WebFreak001 commented 1 year ago

tagged