On Wednesday, 22 August 2018 at 03:58:42 UTC, Nicholas Wilson wrote:
On Tuesday, 21 August 2018 at 14:31:02 UTC, Atila Neves wrote:
The problem is that the code we write doesn't deal directly with pointers - see the recent confusion in this forum over where `scope` on the left applies to the `this` pointer or the one returned by the member function.

Kagamin just told me I needed to use `return` instead of `scope` to get things to work and I'm still not sure why.

The way I think about it is if you have a function that takes a pointer, any pointer, and either returns it or a pointer derived from it (dereferencing or indexing) that argument must be marked `return`. In your case it was a pointer derived from `this` so `return` must be applied to `this`.

I guess my problem is that DIP1000 talks about returning scope values and they don't seem to actually exist in the implementation.

Reply via email to