When returning a parameter by assignment to the first ref parameter, return scope can be inferred when it's a template/auto function. This is not the case for return ref yet: ``` @safe: struct S() { int* x; this(scope int* x) { this.x = x; } // return scope inferred this(ref int x) { this.x = &x; } // no return ref inferred, error } void main() { S!() s; } ```
@dkorpel created dlang/dmd pull request #13952 "Fix issue 22967 - no `return ref` inference for extended return semantics" fixing this issue: - Fix issue 22967 - no return ref inference for extended return semantics https://github.com/dlang/dmd/pull/13952
dlang/dmd pull request #13952 "Fix issue 22967 - no `return ref` inference for extended return semantics" was merged into master: - 13012b879016b03c3d1ff367a860e9f3bf70421a by Dennis Korpel: Fix issue 22967 - no return ref inference for extended return semantics https://github.com/dlang/dmd/pull/13952