[Issue 2723] New: ICE with variadic template parameters, different case

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 10 07:24:08 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2723

           Summary: ICE with variadic template parameters, different case
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: andrei at metalanguage.com


Related to 2722:

//import std.typecons;

Tuple!(Types)[] foo(Types...)(string a)
{
    Tuple!(Types)[] result;
    return result;
}

void main()
{
    auto a = foo!(int, double)("s");
}

fails with:

dmd: template.c:798: MATCH
TemplateDeclaration::deduceFunctionTemplateMatch(Loc, Objects*, Expression*,
Expressions*, Objects*): Assertion `i < parameters->dim' failed.

What happened is that the identifier "Tuple" is not known. The compiler should
clarify that in the error message. Uncommenting the import line makes the code
work.


-- 



More information about the Digitalmars-d-bugs mailing list