(root)/
gcc-13.2.0/
gcc/
testsuite/
gdc.test/
compilable/
test13123.d
auto inferNothrow()
in
{
}
out
{
}
do
{
    return 1;
}

auto dontInferNothrowIn()
in
{
    throw new Exception(null);
}
do
{
    return 1;
}

auto dontInferNothrowOut()
out
{
    throw new Exception(null);
}
do
{
    return 1;
}

enum isNothrow(Attr...) = (Attr.length >= 1)
    && (Attr[0] == "nothrow" || isNothrow!(Attr[1 .. $]));

static assert(isNothrow!(__traits(getFunctionAttributes, inferNothrow)));
static assert(!isNothrow!(__traits(getFunctionAttributes, dontInferNothrowIn)));
static assert(!isNothrow!(__traits(getFunctionAttributes, dontInferNothrowOut)));