(root)/
gcc-13.2.0/
gcc/
testsuite/
gdc.dg/
pr96254a.d
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96254
// { dg-do compile }
struct map(alias fun)
{
    @property run()
    {
    }
}

struct Task(Args)
{
    Args _args;
}

template reduce(functions...)
{
    auto reduce(Args)(Args args)
    {
        alias RTask = Task!(typeof(args));
        auto task = RTask();
    }
}

void main() // { dg-error "'D main' is a nested function and cannot be accessed" }
{
    immutable delta = 1;
    reduce!"a + b"(map!({ immutable x = delta; })());
}