[Issue 1503] New: Type aliases and tuples of template instances

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 14 05:13:32 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1503

           Summary: Type aliases and tuples of template instances
           Product: D
           Version: 1.021
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: samukha at voliacable.com


May be a duplicate of other tuple bugs.

template Foo(T)
{
    alias T Type;
}

template Foos(A...)
{
    alias A Foos;
}

alias Foos!(Foo!(int), Foo!(char)) foos;
foos[0].Type x = 20; // Fails
-----
Error: no identifier for declarator foos[0];

Works if a redundant typeof is added:
typeof(foos[0].Type) x = 20;


-- 



More information about the Digitalmars-d-bugs mailing list