https://issues.dlang.org/show_bug.cgi?id=21518

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
                   |                            |rg
            Summary|delegates not checked for   |delegates not checked for
                   |attribute match in const    |attribute match in const
                   |array parameters            |arrays

--- Comment #1 from [email protected] ---
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 ];
}

--

Reply via email to