Comment #0 by snarwin+bugzilla — 2020-10-29T04:26:02Z
Example program:
---
struct S { int i; }
inout(S) fun(inout(int) i)
{
auto nested() { return inout(S)(i); }
return nested();
}
---
Compiler output from DMD 2.094.0:
---
$ dmd -c bug.d
bug.d(5): Error: inout on return means inout must be on a parameter as well for pure nothrow @nogc @safe inout(S)()
---
Comment #1 by robert.schadek — 2024-12-13T19:12:22Z