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.
Comment #1 by k.hara.pg — 2013-11-22T03:04:37Z
Comment #2 by github-bugzilla — 2013-11-25T20:04:46Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/57c972cbf74e57a823626f487b790e810e2e40b2 fix Issue 8244 - cannot slice a type tuple with '[]' in locations where a type is valid https://github.com/D-Programming-Language/dmd/commit/a6bda1e6fca61df9a46a94dcc95bc5564fc47ce9 Merge pull request #2855 from 9rnsr/fix8244 Issue 8244 - cannot slice a type tuple with '[]' in locations where a type is valid