Bug 3697 – StructTemplateDeclaration and others missing constraint in rule
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-01-11T22:20:00Z
Last change time
2015-06-09T01:27:14Z
Keywords
spec
Assigned to
nobody
Creator
jlquinn
Comments
Comment #0 by jlquinn — 2010-01-11T22:20:21Z
The grammar defines
StructTemplateDeclaration:
struct Identifier ( TemplateParameterList ) StructBody
However, in this form, optional template Constraint is missing. I think the grammar should be:
StructTemplateDeclaration:
struct Identifier ( TemplateParameterList ) Constraints_opt StructBody
and the compiler (2.038) agrees.
UnionTemplateDeclaration, InterfaceTemplateDeclaration, and ClassTemplateDeclaration should be similarly updated.