Comment #0 by snarwin+bugzilla — 2023-01-20T21:10:31Z
As of DMD 2.101.2, the following program fails to compile:
---
void f(U : T[], T)(U arg) {}
void g(T, U : T[])(U arg) {}
void main()
{
int[] a;
f(a); // ok
g(a); // IFTI fails
}
---
The error messsage is
---
bug.d(9): Error: none of the overloads of template `bug.g` are callable using argument types `!()(int[])`
bug.d(2): Candidate is: `g(T, U : T[])(U arg)`
---
The only difference between `f` and `g` is the order in which their template parameters are listed, yet the call to `f` succeeds, while the call to `g` fails to compile.
Comment #1 by robert.schadek — 2024-12-13T19:26:47Z