https://issues.dlang.org/show_bug.cgi?id=20868
--- Comment #5 from Walter Bright <[email protected]> --- To be specific, when compiled with -dip1000: void scoped (scope void delegate() dg) { static void delegate()[] dgs; dgs ~= dg; // Error: scope variable `dg` may not be copied into allocated memory } and there is no error without -dip1000. The first thing to do is simplify: void scoped (scope void* p) { static void*[] px; px ~= p; } which exhibits the same behavior. But let's try this: void scoped (scope void* p) { static void* px; px = p; } which generates no error with or without -dip1000. Marking the function with @safe yields: Error: scope variable p is assigned to non-scope px with or without -dip1000. The examples must behave the same way. They don't, so which is right? The array examples are wrong. --
