Bug 2422 – (D1 only) Type is turned into type tuple in variadic template
Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2008-10-19T08:08:00Z
Last change time
2012-02-20T00:05:32Z
Keywords
rejects-valid
Assigned to
nobody
Creator
samukha
Comments
Comment #0 by samukha — 2008-10-19T08:08:39Z
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 by yebblies — 2012-02-19T23:39:58Z
Works with current D2 (2.058)
Comment #2 by k.hara.pg — 2012-02-19T23:57:34Z
Same as bug 3092?
Comment #3 by yebblies — 2012-02-20T00:05:32Z
Yeah.
*** This issue has been marked as a duplicate of issue 3092 ***