issue 20149 was closed with a partial fix. The fix doesn't work when `@safe` is inferred, example: ``` struct S { int buf; auto slice() inout { return &buf; } } int* fun() @safe { S sb; return sb.slice(); // should error } ``` Remove `inout` or add explicit `@safe` to `slice` and it correctly raises an error.
@dkorpel updated dlang/dmd pull request #12689 "Fix issue 22027, 20149 - inout doesn't imply return" fixing this issue: - Fix issue 22027, 22840 - inout doesn't imply return https://github.com/dlang/dmd/pull/12689
dlang/dmd pull request #12689 "Fix issue 22027, 20149 - inout doesn't imply return" was merged into master: - 9082bb675362f06c7c50141ecebff960648546f1 by dkorpel: Fix issue 22027, 22840 - inout doesn't imply return https://github.com/dlang/dmd/pull/12689