Bug 3670 – Declarator grammar rule is broken

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2010-01-03T22:41:00Z
Last change time
2015-06-09T01:27:14Z
Assigned to
nobody
Creator
jlquinn

Comments

Comment #0 by jlquinn — 2010-01-03T22:41:38Z
http://digitalmars.com/d/2.0/declaration.html As defined, the Declarator rule prevents parsing a simple function such as void foo() {} The problem is that BasicType2 cannot be optional in Declarator Parsing gives Declaration Decl BasicType Declarator FunctionBody void Declarator FunctionBody void BasicType2 Identifier DeclaratorSuffixes FunctionBody void BasicType2 foo DeclaratorSuffixes FunctionBody void BasicType2 foo DeclaratorSuffix FunctionBody void BasicType2 foo Parameters FunctionBody void BasicType2 foo () FunctionBody void BasicType2 foo () {} There is no valid expansion for BasicType2
Comment #1 by bugzilla — 2010-02-12T16:22:06Z
Changeset 1420
Comment #2 by bugzilla — 2010-03-08T22:21:46Z
Fixed dmd 1.057 and 2.041