Bug 8244 – cannot slice a type tuple with '[]' in locations where a type is valid
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-06-14T12:03:00Z
Last change time
2013-11-25T22:48:56Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
timon.gehr
Comments
Comment #0 by timon.gehr — 2012-06-14T12:03:56Z
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.