Should the compiler be able to do a double look up?
Paul Backus
snarwin at gmail.com
Fri Jan 1 00:50:02 UTC 2021
On Thursday, 31 December 2020 at 18:52:18 UTC, 12345swordy wrote:
> Context: https://github.com/dlang/dmd/pull/9702
>
> Would a double look up be able to fix this bug properly?
>
> -Alex
Lots of things would be able to fix it. The most obvious way
would be to have each template alias parameter carry its own
(optional) context pointer with it--then there'd be no need for
different contexts to fight over who owns the "this" pointer.
Unfortunately the implementation of closures and context pointers
in DMD is not very high-quality to begin with (see the many, many
delegate-related issues in bugzilla), so any actual attempt to
solve issue 5710 has to either address or work around the
existing technical debt in that part of the frontend.
More information about the Digitalmars-d
mailing list