digitalmars.D.learn - Qualifying function parameters using return vs return scope
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (13/13) Feb 20 2019 Can somebody explain when
Can somebody explain when - a free function parameter or - a struct/class member function's `this`-parameter should be qualified as `return` vs `return scope`? Is there a part of the spec that explains this difference? Further, are there differences in the way - a free function parameter, - a `struct` member function's `this` pointer, or - a `class` member function's `this` pointer is handled? I've noticed cases where using the `return scope` instead of just `return` prevents -dip1000 from detecting invalid escaping of scoped objects. Is this intended or a bug?
Feb 20 2019