return scope vs. scope return
0xEAB
desisma at heidel.beer
Sat Nov 5 16:13:18 UTC 2022
Apparently there a difference between:
- ```d
Message withBody(Body body_) return scope { /* … */ }
```
- ```d
Message withBody(Body body_) scope return { /* … */ }
```
> ```
> Deprecation: returning `this._body` escapes a reference to
> parameter `this`
> perhaps change the `return scope` into `scope return`
> ```
What is it?
And why (…does the order of attributes matter)?
More information about the Digitalmars-d-learn
mailing list