Seems similar to but distinct from https://issues.dlang.org/show_bug.cgi?id=6501 --- bugz.d template bug() { import bugz2; void bug(S) {} } void main() { import bugz2; bug(S()); } --- bugz2.d struct S {} --- bugz.d(4): Error: undefined identifier S bugz.d(9): Error: template bugz.bug cannot deduce function from argument types ()(S), candidates are: bugz.d(2): bug()(S) DMD64 D Compiler v2.094.0-beta.1 Note that if it isn't IFTI - use `bug!()(S());` or any other form of explicit instantiation - then it is fine.
*** This issue has been marked as a duplicate of issue 13737 ***