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

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


Reply via email to