Comment #0 by verylonglogin.reg — 2014-02-03T05:01:01Z
This code should compile:
---
enum E { a }
inout(int) f(inout E);
---
Error: inout on return means inout must be on a parameter as well for inout(int)(inout(E))
---
Comment #1 by verylonglogin.reg — 2014-11-27T11:34:04Z
Another testcase:
---
enum E { a }
auto f(inout(E) val) { return val; }
---
main.d(3): Error: variable main.f.val inout variables can only be declared inside inout functions
main.d(3): Error: inout on return means inout must be on a parameter as well for inout(E)(inout(E) val)
---
Comment #2 by dlang-bugzilla — 2017-07-02T17:05:11Z