[Issue 21745] Closure created in struct constructor passed to class constructor is not heap allocated

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 24 08:55:22 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21745

FeepingCreature <default_357-line at yahoo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |FIXED

--- Comment #7 from FeepingCreature <default_357-line at yahoo.de> ---
This is indeed a problematic case. We want "this" to reference the variable on
which the struct method was called. But we also want the stackframe to be heap
allocated, so we can return a closure. It seems those two requirements may
simply not be simultaneously satisfiable? I'm not sure which one should take
precedence.

--


More information about the Digitalmars-d-bugs mailing list