D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3998 - BasicType2 rule shouldn't have slice syntax
Summary: BasicType2 rule shouldn't have slice syntax
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL: http://digitalmars.com/d/2.0/declarat...
Keywords: spec
Depends on:
Blocks:
 
Reported: 2010-03-21 21:13 UTC by Jerry Quinn
Modified: 2014-02-15 02:42 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jerry Quinn 2010-03-21 21:13:54 UTC
It doesn't make sense to have array slice be part of the BasicType2 rule.  This rule is for type constructs and array slices only make sense in expressions.
Comment 1 Ellery Newcomer 2010-03-21 22:31:02 UTC
(In reply to comment #0)
> It doesn't make sense to have array slice be part of the BasicType2 rule.  This
> rule is for type constructs and array slices only make sense in expressions.

They aren't array slices. They're tuple slices, eg:

template T(E...){
    alias E T;
}
void main(){
    alias T!(char,int,float) K;
    alias K[1..$] J; // (int, float)
}
Comment 2 Walter Bright 2012-01-23 17:44:59 UTC
Ellery is right.