[Issue 20233] opDispatch hides alias this properties
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 21 08:47:33 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20233
Lorenzo Cogotti <micia at inventati.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
--- Comment #3 from Lorenzo Cogotti <micia at inventati.org> ---
You are right, looking into the implementation of `std.typecons.Proxy` I have
noticed that the process to forward calls/access to an `alias this` from
`opDispatch()` is more involved than that.
Thus I am changing the importance of this report to `Enhancement`, since I
still stand by the opinion that the error message is quite misleading and might
be improved.
Also, probably the `opDispatch()` inner workings would need to be clarified a
little bit better in the language reference:
https://dlang.org/spec/operatoroverloading.html#dispatch
Since, by just reading, one can only obtain partial and at times confusing
information.
I had to look into the linked bug report to find out that it has precedence
over `alias this`, and found out by trial and error that it also has precedence
over UFCS.
--
More information about the Digitalmars-d-bugs
mailing list