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
http://www.dsource.org/projects/phobos/changeset/2135