D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7748 - Unification of template arguments with parameters does not work with variadics
Summary: Unification of template arguments with parameters does not work with variadics
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-21 11:59 UTC by Andrei Alexandrescu
Modified: 2013-11-26 20:27 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrei Alexandrescu 2012-03-21 11:59:23 UTC
Consider:

struct S(T...) {
}

void fun(T1, T2...)(S!(T1) a, S!(T2) b) {
}

void main() {
    S!(string) s1;
    S!(int, bool) s2;
    fun(s1, s2);
}

The example fails to compile, but it works and should associate the two parameters accordingly. (It does work without variadics.)