[Issue 21912] Invalid stack closure when calling delegate inside lambda
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 14 20:17:37 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21912
--- Comment #6 from Dennis <dkorpel at live.nl> ---
(In reply to Sebastiaan Koppe from comment #5)
> Could you explain what that has to do with the compiler deciding not to
> allocate the closure?
The closure is not allocated because parameter `dg` of `foo` is inferred
`scope`.
`dg` is inferred `scope` because `foo` is inferred (or annotated) `pure`.
The faulty logic that `pure implies scope` is described in the linked issue.
See also the forum post I made about it:
https://forum.dlang.org/post/jnkdcngzytgtobihzggj@forum.dlang.org
--
More information about the Digitalmars-d-bugs
mailing list