Test case:
void fun(alias a)()
{
auto dg = () {
void gun() { }
a(&gun);
};
}
void main()
{
void hun(R)(R) { }
fun!hun();
}
This results in the following ICE:
dmd: toir.c:249: elem* getEthis(Loc, IRState*, Dsymbol*): Assertion `thisfd->isNested() || thisfd->vthis' failed.
This is possibly a duplicate of issue #12839, as it apparently causes the same assertion to fail, but I'm not sure. The test case seems different enough that I decided to open a new bug report for it.
Comment #1 by robert.schadek — 2024-12-13T18:47:53Z