How to replicate an Error: scope variable `old` assigned to `ref` variable `ctx` with longer lifetime?

Dennis dkorpel at gmail.com
Mon May 12 22:57:22 UTC 2025


On Monday, 12 May 2025 at 21:46:04 UTC, matheus wrote:
> I saw a post 
> (https://forum.dlang.org/post/aklmfkzqpsraprjfxsjh@forum.dlang.org) by Dennis where he gives an example:
>
> So I'd like to try it out, so I wrote the snippet below:
>
> @safe
>
> import std;
>
> struct S{}

Make sure S contains at least one pointer, and compile with 
-preview=dip1000


More information about the Digitalmars-d-learn mailing list