[Issue 23761] Trait getOverloads does not retain "this" reference when used with instance

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 8 21:13:59 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23761

--- Comment #6 from RazvanN <razvan.nitu1305 at gmail.com> ---
(In reply to m.bierlee from comment #5)

> Thanks for looking into it. Indeed the code doesn't make much sense, it is
> just a small snippet of a problem I encountered in a bigger project where it
> does make more sense.

I have created PR: https://github.com/dlang/dmd/pull/14969. This should fix the
bogus error message and also allow to take the address of the overload. That
way my workaround becomes valid.

As for carrying the instance pointer over to the overload, I can look into
implementing that. If it is not possible, then maybe we can add a clarification
to the spec.

--


More information about the Digitalmars-d-bugs mailing list