Bug 11814 – Unnecessary error messages "does not match ..." on IFTI failure
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-24T18:45:00Z
Last change time
2013-12-30T17:23:35Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2013-12-24T18:45:11Z
From fail_compilation/fail190.d:
T* f(T...)(T x) // line 1
{
return null;
}
void main()
{
auto x = f(2,3,4); // line 7
*x = *x;
}
Prints:
fail190.d(1): Error: can't have pointer to (int, int, int)
fail190.d(7): Error: template instance fail190.f!(int, int, int) error instantiating
fail190.d(7): Error: template fail190.f does not match any function template declaration. Candidates are:
fail190.d(1): fail190.f(T...)(T x)
fail190.d(7): Error: template fail190.f(T...)(T x) cannot deduce template function from argument types !()(int, int, int)
But, f(2,3,4) at line 7 succeeds to deduce template parameter T, so printing "does not match ..." is essentially incorrect.