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

Fix semantic bug in limitscope() #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Martijn-Sturm
Copy link

Fixed a problem with the logic in the if else statements from lines 94 to 101 prior to this commit:
In case the rule of self is 'bidirectional', the if statement on line 94-95 evaluates to true. The code following this statement will update the scope of self only if obj is downstream of self in the
sequence. But for bidirectional, the scope also has to be updated if obj is upstream of self. This was meant to happen in the next elif statement.

However: the conditional of line 98-99 is an elif statement. This leads to that this code is skipped if the self.rule is bidirectional, since the if block of line 94-95 evaluated to true.

So if the bidirectional terminate modifier (obj) is upstream of the tagobject (self) it should modify, that tagobject's (self) scope won't be modified.

Fixed a problem with the logic in the if else statements from lines 94 to 101 prior to this commit:
In case the rule of self is 'bidirectional', the if statement on line 94-95 evaluates to true. The code following this statement will update the scope of self only if obj is downstream of self in the
sequence. But for bidirectional, the scope also has to be updated if obj is upstream of self. This was meant to happen in the next elif statement.

However: the conditional of line 98-99 is an elif statement. This leads to that this code is skipped if the self.rule is bidirectional, since the if block of line 94-95 evaluated to true.

So if the bidirectional terminate modifier (obj) is upstream of the tagobject (self) it should modify, that tagobject's (self) scope won't be modified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant