www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2723] New: ICE with variadic template parameters, different case

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: andrei 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.


-- 
Mar 10 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2723






I have a similar case that fails with the same assertion in 1.041. In 1.039, it
segfaulted instead.


-- 
Mar 10 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2723


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 2.027


-- 
Apr 01 2009