digitalmars.D - Should the compiler be able to do a double look up?
12345swordy <alexanderheistermann gmail.com> writes:
Context: https://github.com/dlang/dmd/pull/9702 Would a double look up be able to fix this bug properly? -Alex
Dec 31 2020
Paul Backus <snarwin gmail.com> writes:
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? -AlexLots 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.