auto f(scope Object i){return i;}
The above compiles with -dip1000 because parameter i is inferred as `return scope`. As the author deliberately wrote `scope`, the compiler should error when trying to return a scope parameter. This will help to catch bugs in complex generic code.
Comment #1 by bugzilla — 2018-03-03T09:16:10Z
Inference of attributes is done for each attribute independently of any others, this is the way it is supposed to work.
The compiler should catch any bugs where i is returned and then used wrongly. If that is not so, then please file a bug report for that.