struct foo(T, T a) {} void bar(T, T a)(foo!(T, a) f) {} void main() { foo!(float, 0) f; bar!(float, 0)(f); // cannot implicitly convert expression (f) of type foo!(float,0) to foo!(float,A) } If a's type is instead set in the template definition, this compiles correctly.
*** This issue has been marked as a duplicate of issue 2372 ***