Bug 8959 – IsExpression should support syntax which has no Identifier in all cases
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-11-03T09:14:00Z
Last change time
2013-03-08T05:10:54Z
Keywords
pull
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2012-11-03T09:14:37Z
From: http://dlang.org/expression#IsExpression
IsExpression now supports following syntax.
1. is ( Type )
2. is ( Type : TypeSpecialization )
3. is ( Type == TypeSpecialization )
4. is ( Type Id )
5. is ( Type Id : TypeSpecialization )
6. is ( Type Id == TypeSpecialization )
7a. is ( Type Id : TypeSpecialization , TemplateParameterList )
7b. is ( Type Id == TypeSpecialization , TemplateParameterList )
When sorted by the presence or absence of Id:
1. is ( Type )
2. is ( Type : TypeSpecialization )
3. is ( Type == TypeSpecialization )
X. is ( Type : TypeSpecialization , TemplateParameterList ) // ?
Y. is ( Type == TypeSpecialization , TemplateParameterList ) // ?
4. is ( Type Id ) // 1 + Id
5. is ( Type Id : TypeSpecialization ) // 2 + Id
6. is ( Type Id == TypeSpecialization ) // 3 + Id
7a. is ( Type Id : TypeSpecialization , TemplateParameterList ) // X + Id
7b. is ( Type Id == TypeSpecialization , TemplateParameterList ) // Y + Id
I think X and Y should be supported from the view of language symmetry.