1135 – invariant keyword parsing is messed up

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1135 - invariant keyword parsing is messed up
Summary: invariant keyword parsing is messed up
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 All
: P2 regression
Assignee: Walter Bright
URL:
Keywords: rejects-valid
Depends on:
Blocks:
Reported: 2007年04月12日 19:04 UTC by torhu
Modified: 2014年02月16日 15:22 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description torhu 2007年04月12日 19:04:52 UTC
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
Comment 1 torhu 2007年04月19日 15:53:33 UTC
Fixed DMD 1.013.
Comment 2 Thomas Kühne 2007年04月23日 12:56:23 UTC
Added to DStress as
http://dstress.kuehne.cn/run/i/invariant_33_A.d
http://dstress.kuehne.cn/run/i/invariant_33_B.d 


AltStyle によって変換されたページ (->オリジナル) /