www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8244] New: cannot slice a type tuple with '[]' in locations where a type is valid

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

           Summary: cannot slice a type tuple with '[]' in locations where
                    a type is valid
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: timon.gehr gmx.ch



With DMD 2.059, type tuples cannot be sliced with [] in all (?) locations where
a type would be valid.

For example:

template TypeTuple(T...){ alias T TypeTuple; }
TypeTuple!(int,int)[] x; // error: cannot have array of (int, int)

The code should compile.
'[]' needs to be consistently interpreted as the slice operator
if it operates on a tuple.

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