Skip to content

Skip free variable checking for member expressions #973

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

Merged
merged 5 commits into from
Feb 2, 2021

Conversation

kkjeer
Copy link
Contributor

@kkjeer kkjeer commented Jan 30, 2021

Fixes #969

The compiler currently does not track equality information for member expressions of the form a.f. This can result in false positive errors when checking bounds for free variables (see issue #969 for an example).

This PR modifies the free variable checking logic to skip checking two expressions E1 and E2 for free variables if one or both of E1 or E2 is or contains a member expression. This extends the check that was already done to skip free variable checking if E1 or E2 read memory via a pointer.

Copy link
Contributor

@sulekhark sulekhark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

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.

Unexpected bounds error after PR #903
2 participants