June 05, 2023 [Issue 11044] Escaping references to lazy argument are allowed and compile to wrong code | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11044 --- Comment #9 from Vladimir Panteleev <dlang-bugzilla@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. -- |
Copyright © 1999-2021 by the D Language Foundation