dmd/compiler/test/compilable/test16037.d
2022-07-09 18:53:07 +02:00

21 lines
366 B
D

/* REQUIRED_ARGS: -preview=dip1000
*/
// https://issues.dlang.org/show_bug.cgi?id=16037
@safe:
void testXXX () @nogc
{
Object o;
scope bool delegate (Object) alwaysFalse = (Object y) { return false; };
scope c1 = o !is null ? (Object y) { return o is y; } : alwaysFalse;
}
auto f() @nogc
{
int a;
void g(){ a=1; }
scope h=&g;
h();
}