www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2422] New: Type is turned into type tuple in variadic template

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2422

           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: bugzilla digitalmars.com
        ReportedBy: samukha voliacable.com


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


-- 
Oct 19 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2422


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies gmail.com
           Platform|x86                         |All
            Version|2.019                       |D1
            Summary|Type is turned into type    |(D1 only) Type is turned
                   |tuple in variadic template  |into type tuple in variadic
                   |                            |template
         OS/Version|Windows                     |All


--- Comment #1 from yebblies <yebblies gmail.com> 2012-02-20 18:39:58 EST ---
Works with current D2 (2.058)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 19 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2422



--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2012-02-19 23:57:34 PST ---
Same as bug 3092?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 19 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2422


yebblies <yebblies gmail.com> changed:

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


--- Comment #3 from yebblies <yebblies gmail.com> 2012-02-20 19:05:32 EST ---
Yeah.

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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 20 2012