Showing with 5 additions and 4 deletions.
  1. +5 −4 std/format.d
9 changes: 5 additions & 4 deletions std/format.d
Original file line number Diff line number Diff line change
Expand Up @@ -3455,18 +3455,19 @@ unittest
return i + k;
}

int delegate(short) @nogc bar() nothrow
@system int delegate(short) @nogc bar() nothrow pure
{
int* p = new int;
return &foo;
}

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

unittest
{
void func() {}
formatTest( &func, "void delegate()" );
void func() @system { __gshared int x; ++x; throw new Exception("msg"); }
version (linux) formatTest( &func, "void delegate() @system" );
}

/*
Expand Down