[Issue 2043] Closure outer variables in nested blocks are not allocated/instantiated correctly: should have multiple instances but only have one.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 5 16:55:56 UTC 2018


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

--- Comment #31 from timon.gehr at gmx.ch ---
(timon.gehr meant to write in comment #30)
> (In reply to Walter Bright from comment #28)
> > Added the `safe` keyword because of the immutable variable issue described
> > in the comments.
> 
> This is not a one-off issue. It is a symptom of the generally wrong
> behavior. DMD is sharing the same memory for different variables with
> *overlapping* lifetimes. This is plain memory corruption, whether or not
> immutable is involved.

--


More information about the Digitalmars-d-bugs mailing list