[Issue 5738] New: error message for template mismatch could be better
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 15 03:23:21 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5738
Summary: error message for template mismatch could be better
Product: D
Version: D1 & D2
Platform: All
OS/Version: All
Status: NEW
Keywords: diagnostic
Severity: minor
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: mrmocool at gmx.de
--- Comment #0 from Trass3r <mrmocool at gmx.de> 2011-03-15 03:20:12 PDT ---
void bla(T...)(T args)
{
foreach(idx, arg; args)
blub(idx, arg);
}
void blub(T)(short idx, T arg) // on x64, replace short with int to get a more
real world case
{
}
void main()
{
bla(5, 2);
}
templ.d(4): Error: template templ.blub(T) does not match any function template
declaration
templ.d(4): Error: template templ.blub(T) cannot deduce template function from
argument types !()(uint,int)
templ.d(4): Error: template templ.blub(T) does not match any function template
declaration
templ.d(4): Error: template templ.blub(T) cannot deduce template function from
argument types !()(uint,int)
templ.d(13): Error: template instance templ.bla!(int,int) error instantiating
It wasn't obvious for me that it couldn't implicitly convert the idx argument.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list