Bug 2651 – class body declaration grammar incorrect

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2009-02-08T21:55:00Z
Last change time
2015-06-09T01:21:00Z
Keywords
spec
Assigned to
nobody
Creator
jlquinn
Blocks
2652

Comments

Comment #0 by jlquinn — 2009-02-08T21:55:57Z
The published class grammar looks like: ClassBodyDeclaration: Declaration Constructor Destructor StaticConstructor StaticDestructor Invariant UnitTest ClassAllocator ClassDeallocator However, the Declaration grammar doesn't permit a construct such as synchronized ~this () {} or const { void fn1 () {} void fn2 () {} } The rest of the docs clearly expect this kind of construction to be allowed. I believe the fix is to modify the class body grammar to: ClassBodyDeclaration: DeclDef <-- this is the change Constructor Destructor StaticConstructor StaticDestructor Invariant UnitTest ClassAllocator ClassDeallocator
Comment #1 by bugzilla — 2010-11-08T08:30:45Z