[Issue 13746] formatValue of delegates with @nogc

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Nov 18 02:55:44 PST 2014


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

Илья Ярошенко <ilyayaroshenko at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|formatValue of functions    |formatValue of delegates
                   |and delegates with @nogc    |with @nogc

--- Comment #1 from Илья Ярошенко <ilyayaroshenko at gmail.com> ---
update:

unittest
{
    import std.conv : to;

    int i;

    int foo(short k) @nogc
    {
        return i + k;
    }

    int delegate(short) @nogc bar() nothrow
    {
        return &foo; 
    }

    assert(to!string(&bar) == "int delegate(short) @nogc delegate() nothrow");
}

--


More information about the Digitalmars-d-bugs mailing list