[Issue 9503] New: [grammar] template declaration/instance must take one or more arguments?
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 12 19:59:40 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9503
Summary: [grammar] template declaration/instance must take one
or more arguments?
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: websites
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-02-12 19:59:33 PST ---
I found a funny grammar bug.
In current, nonterminal TemplateDeclaration symbol is defined as follows.
http://dlang.org/template
TemplateDeclaration:
template TemplateIdentifier ( TemplateParameterList ) Constraintopt {
DeclDefs }
And, TemplateParameterList is defined as:
TemplateParameterList:
TemplateParameter
TemplateParameter ,
TemplateParameter , TemplateParameterList
TemplateParameterList must consume one or more TemplateParameter, so we cannot
declare zero-arg template declaration!
Of course it is possible with current compiler, so it's a grammar bug.
Same problem is in TemplateMixinDeclaration.
Also, template instantiation grammar has similar problem.
TemplateArgumentList must consume one or more arguments, so TemplateMixin and
TemplateInstance cannot take zero arguments.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list