https://issues.dlang.org/show_bug.cgi?id=23739
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |safe --- Comment #1 from [email protected] --- This bug can cause memory corruption in @safe code: --- struct S{ int* x; int opApply(scope int delegate(ref int* x)@safe dg)@safe{ return dg(x); } } ref int* foo(ref S s)@safe{ foreach(x;s) return x; assert(0); } void main()@safe{ auto s=new S; *foo(*s)=2; // segfault } --- --
