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

kinke <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #2 from kinke <[email protected]> ---
> presumably because the memory referenced by the pointer is no longer valid.

Exactly, but that's to be expected, as it's not captured. The problem is rather
that this isn't caught when making everything @safe with -dip1000 - the
compiler should complain that the address of local `s` is assigned to a heap
closure `pS` with longer lifetime.

--

Reply via email to