2 REQUIRED_ARGS: -dip1000
6 fail_compilation/test15544.d(21): Error: reference to local `this` assigned to non-scope `_del` in @safe code
7 fail_compilation/test15544.d(23): Error: reference to local `this` assigned to non-scope `_del` in @safe code
11 // https://issues.dlang.org/show_bug.cgi?id=15544
13 void delegate() @safe _del;
20 void foo() { assert(x == 42); }
23 _del = { assert(x == 42); };
30 fail_compilation/test15544.d(47): Error: reference to local `y` assigned to non-scope `dg` in @safe code
39 int bar() { return *x; }
43 @safe void testClosure2()
46 int bar() { return *y; }