why is it a class property cannot be used like a.b ~= c; ?
someone
someone at somewhere.com
Sun Sep 5 00:55:29 UTC 2021
On Saturday, 4 September 2021 at 23:57:09 UTC, jfondren wrote:
> You're returning a copy of a slice, so if this compiled nothing
> useful would happen anyway. This works if `whatever()` returns
> `ref dstring` instead, with no other changes. Search
> https://dlang.org/spec/function.html for 'lvalue' and this pops
> right up.
At first glance it seems a bit counter-intuitive but yes, you are
right, thanks for the link jfronden :)
More information about the Digitalmars-d-learn
mailing list