[Issue 22128] opApply delegate can escape scope without duly invoking GC allocation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 21 09:19:07 UTC 2022


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

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> ---
The problem is solved if -preview=dip1000 is used to compile it.

But as a general practice, I recommend adding `scope` to the delegate parameter
to opApply().

--


More information about the Digitalmars-d-bugs mailing list