Summary: Type is turned into type tuple in variadic template
           Product: D
           Version: 2.019
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]

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[]


Reply via email to