[Issue 11814] New: Unnecessary error messages "does not match ..." on IFTI failure
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Dec 24 18:45:13 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11814
Summary: Unnecessary error messages "does not match ..." on
IFTI failure
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: diagnostic
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-12-24 18:45:11 PST ---
>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.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list