[Issue 11044] Escaping references to lazy argument are allowed and compile to wrong code
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 5 11:26:07 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=11044
--- Comment #9 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
(In reply to Adam D. Ruppe from comment #7)
> lazy lowers to delegate, so it should be easy to just lower to the right
> kind of delegate and get correct behavior.
Judging from the lazy-related bugs (including this one), this lowering seems a
little broken at the moment. Perhaps the way forward is to fix the lowering,
and everything else will align as a result.
I think lazy existed in the language long before lambda functions; this old
implementation is probably where all the bugs come from. So, perhaps today it
could be reimplemented as a lowering to a lambda.
--
More information about the Digitalmars-d-bugs
mailing list