https://issues.dlang.org/show_bug.cgi?id=11044
--- Comment #9 from Vladimir Panteleev <[email protected]> --- (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. --
