[Issue 21912] Invalid stack closure when calling delegate inside lambda
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 12 13:26:23 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21912
Dennis <dkorpel at live.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |dkorpel at live.nl
Resolution|--- |DUPLICATE
--- Comment #4 from Dennis <dkorpel at live.nl> ---
This has to do with pure bypassing scope checks:
```
int delegate() pure foo(int delegate() pure dg) pure {
return dg;
}
int delegate() bla(int i) pure {
return foo(() => i);
}
void main() {
assert(bla(5)() == 5);
}
```
*** This issue has been marked as a duplicate of issue 20150 ***
--
More information about the Digitalmars-d-bugs
mailing list