D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3697 - StructTemplateDeclaration and others missing constraint in rule
Summary: StructTemplateDeclaration and others missing constraint in rule
Status: RESOLVED FIXED
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/template...
Keywords: spec
Depends on:
Blocks:
 
Reported: 2010-01-11 22:20 UTC by Jerry Quinn
Modified: 2015-06-09 01:27 UTC (History)
1 user (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-01-11 22:20:21 UTC
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.
Comment 1 Walter Bright 2010-02-12 16:27:49 UTC
Changeset 1421
Comment 2 Walter Bright 2010-03-08 22:27:59 UTC
Fixed dmd 2.041