[Issue 3720] Taking address of member functions possible without an instance
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 27 13:08:50 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=3720
ZombineDev <petar.p.kirov at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |petar.p.kirov at gmail.com
Resolution|INVALID |---
--- Comment #18 from ZombineDev <petar.p.kirov at gmail.com> ---
Reopening as this issue is a too ugly issue to be left unaddressed.
I suggest the following plan going forward:
1. Deprecate the expression &<AggregateType>.<memberFunction> even in @system
code, but allow the equivalent:
&__traits(getMember, <AggregateType>, "<memberFunction>")
as we need to have migration path for the small amount of code that is able to
correctly use &<AggregateType>.<memberFunction>
2. After deprecation period is finished, reintroduce the
&<AggregateType>.<memberFunction> but with different semantics: retunring a
delegate with context pointer set to null.
--
More information about the Digitalmars-d-bugs
mailing list