D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2422 - (D1 only) Type is turned into type tuple in variadic template
Summary: (D1 only) Type is turned into type tuple in variadic template
Status: RESOLVED DUPLICATE of issue 3092
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: All All
: P2 major
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2008-10-19 08:08 UTC by Max Samukha
Modified: 2012-02-20 00:05 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 Max Samukha 2008-10-19 08:08:39 UTC
template Bar(A...)
{
    alias A[0] T;
    T[] a = [];
}

template Foo(A...)
{
    alias Bar!(A) bar;
}

alias Foo!(int, 1) foo;
----
Error: can't have array of (int)

T in Bar becomes tuple(int) instead of expected int. The example compiles if all arguments passed to Foo are types:

alias Foo!(byte, int) foo; // ok, foo.a is byte[]
Comment 1 yebblies 2012-02-19 23:39:58 UTC
Works with current D2 (2.058)
Comment 2 Kenji Hara 2012-02-19 23:57:34 UTC
Same as bug 3092?
Comment 3 yebblies 2012-02-20 00:05:32 UTC
Yeah.

*** This issue has been marked as a duplicate of issue 3092 ***