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

RazvanN <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |WONTFIX

--- Comment #1 from RazvanN <[email protected]> ---
What happens here is that you are creating a delegate that receives some stack
pointers. When the delegate is actually called it ends up modifying an expired
stack frame (which coincidentally points to the current frame).

Although this is problematic, I would argue that it is a code problem, not a
compiler one. What should the compiler be doing here? I guess that in @safe
code it should not allow the references to a, b, and c escape the scope of
test1. However, this bug report already exists:
https://issues.dlang.org/show_bug.cgi?id=23438 .

I will close this as WONTFIX because this system code is ok from a compiler
perspective.

--

Reply via email to