Two examples of how this bug manifests itself. Removing 'synchronized' fixes both these examples:
bug.d:
---
class C {
synchronized invariant { int x; }
}
---
dmd -c bug
bug.d(2): variable bug.C.x variable x cannot be synchronized
bug2.d:
---
class C {
int x;
synchronized invariant { this.x = 5; }
}
---
dmd -c bug2
bug.d(3): found '.' when expecting '('
bug.d(3): found ';' when expecting ')'
bug.d(3): semicolon expected following function declaration