Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with sync guards on static operations #209

Closed
joey-coleman opened this issue Nov 22, 2013 · 1 comment
Closed

Problem with sync guards on static operations #209

joey-coleman opened this issue Nov 22, 2013 · 1 comment
Assignees
Labels
duplicate Mergable A fix is available on a branch to merge for release
Milestone

Comments

@joey-coleman
Copy link
Member

The following bug was originally reported on Sourceforge by nick_battle, 2013-11-20 07:42:43.037000:

Before the fix, a static operation with a "per" guard in a "sync" section would
fail - internally, the implementation was assuming guarded operations always
have a "self", but this is not the case for static operations. The result was a
null pointer exception.

Static operation guards now work, with caveats. A guard can refer to #act, #fin
and #req of other static operations (the counters referring to how many times
the operation has been called universally), but if a static operation guard
refers to the #act (etc) of a non-static operation, this results in a runtime
error (an illegal history operator). The problem is that it is not certain which
object instance counters are being referred to in this case since there is no
"self" from the operation's context.

The fix should be in 2.0.2.

@joey-coleman
Copy link
Member Author

Comment by nick_battle, 2013-11-20 07:44:26.553000:

This change follows the recent fix to enable sync guards on static operations. The fix prevents non-static instance variables from being referenced from the sync clause of a static operation, and it also prevents sync clauses from being declared on overloaded operations that include a mix of static and non-statics.

A new type checking error has been added:
3323, "Overloaded operation cannot mix static and non-static"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Mergable A fix is available on a branch to merge for release
Projects
None yet
Development

No branches or pull requests

2 participants