Comment #0 by dlang-bugzilla — 2020-11-24T05:39:53Z
/////////////////////////// test.d //////////////////////////
auto fun(int x)()
{
gun();
}
void gun()()
{
fun!2();
}
unittest
{
// fun!1(); // Uncomment to fix below instantiation
fun!2(); // forward reference to inferred return type ...
}
/////////////////////////////////////////////////////////////
Similar to issue 10810. However, there is evidence that this is just a dirty compiler bug instead of some intrinsic design limitation: explicitly instantiating the template with a parameter different from the one used in the recursive call causes the recursive instantiation to succeed (causing "spooky action at a distance").
Comment #1 by robert.schadek — 2024-12-13T19:12:58Z