https://issues.dlang.org/show_bug.cgi?id=21518
--- Comment #2 from [email protected] --- Also not restricted (In reply to moonlightsentinel from comment #1) > This issue is not restricted to function parameters: > > void delegates() > { > const dg = delegate() @system { int* p; int x; p = &x; }; > // pragma(msg, typeof(dg)); // const(void delegate() pure nothrow @nogc > @system) > > // No error > const(void delegate() @safe)[] arg = [ dg ]; > // pragma(msg, typeof(arg)); // const(void delegate() @safe)[] > > // Correctly fails > // void delegate() @safe[] arg = [ dg ]; > } Also missing: const(void delegate() @system)[] sysA = [ dg ]; const(void delegate() @safe)[] safeA = sysA; --
