Bug 7062 – Void parameter errors with overloaded templates don't indicate instantiation location

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-12-03T07:35:00Z
Last change time
2012-10-21T14:51:35Z
Keywords
diagnostic
Assigned to
nobody
Creator
dlang-bugzilla

Comments

Comment #0 by dlang-bugzilla — 2011-12-03T07:35:25Z
This program gives a "cannot have parameter of type void" at line 1, but no errors at the instantiation site (inside main): void f(T...)(T a) if (T.length > 1) {} void f(T)(T a) {} void g() {} void main() { f(g()); }
Comment #1 by andrej.mitrovich — 2012-10-21T14:51:35Z
2.060: test.d(12): Error: template test.f does not match any function template declaration test.d(1): Error: template test.f cannot deduce template function from argument types !()(void)