Similar to issue 11170, but not a duplicate (GDC triggers an ICE in different locations for both tests).
This gives a bad error message. "D main" is *not* a nested function.
---
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()
{
immutable delta = 1;
reduce!"a + b"(map!({ immutable x = delta; })());
}
Comment #1 by robert.schadek — 2024-12-13T19:10:14Z