[Issue 1135] New: invariant keyword parsing is messed up
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Apr 12 17:04:53 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1135
Summary: invariant keyword parsing is messed up
Product: D
Version: 1.011
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: critical
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: torhu at yahoo.com
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
--
More information about the Digitalmars-d-bugs
mailing list