[Issue 8244] New: cannot slice a type tuple with '[]' in locations where a type is valid

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 14 12:01:43 PDT 2012


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 at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 2012-06-14 12:03:56 PDT ---
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: -------


More information about the Digitalmars-d-bugs mailing list