Comment #0 by snarwin+bugzilla — 2023-01-20T21:40:12Z
As of DMD 2.101.2, the following program fails to compile:
---
template f()
{
void f(T)(T t) {}
void f(string s) {}
}
template g()
{
void g(string s) {}
void g(T)(T t) {}
}
void main()
{
f(123); // ok
g(123); // error
}
---
The error message is:
---
bug.d(16): Error: none of the overloads of template `bug.g` are callable using argument types `!()(int)`
bug.d(7): Candidate is: `g()(string s)`
---
Note that the only difference between `f` and `g` is the order of the overloads inside the template.
Comment #1 by robert.schadek — 2024-12-13T19:26:49Z