https://issues.dlang.org/show_bug.cgi?id=20156
Dennis <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #3 from Dennis <[email protected]> --- This is 'fixed' because `inout` doesn't imply `return` anymore (issue 22027). If you change the function signature to this: ``` inout(int[]) f1(return ref inout A); ``` The error is back when you pass -preview=dip1000, but it's valid, because the return value can be a pointer to the struct A which is allocated on the stack in f2, and you can't store a stack pointer in a dynamic array. If f1 becomes this (which is likely what the function should be, judging by the types): ``` inout(int[]) f1(ref return scope inout A); ``` Then there's no error, which is correct because local var c is not `scope`. Either way, it's fixed now. --
