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

--- Comment #1 from b2.t...@gmx.com ---
(In reply to b2.temp from comment #0)
> repro:
> 
> 
> ===
> struct Foo
> {
>     private void delegate() dg;
>     void assign() @safe {dg = &sameThis;}
>     void sameThis(){}
> }
> ===
> 
> yield: "address of variable this assigned to this with longer lifetime"
> 
> But the delegate is never escaped and the context pointer and the this have
> the same lifetime.

In the project, the equivalent of "sameThis" is @trusted, in case of another
error would appear.

--

Reply via email to