This renders default arguments in generic functions unusable.
void foo(U, T = int)(T v = T.init)
{
}
void main()
{
foo!int(); // ok
foo!int("x"); // fail
}
Error: function `foo` is not callable using argument types `(string)`
The second call tries to reuse the previous instantiation instead of creating a new one. An explicit instantiation works but defeats the purpose of using default arguments.
Comment #1 by robert.schadek — 2024-12-13T19:38:16Z