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 "there exists"/"such that" not followed by a var name #538

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented Jul 3, 2023

Should unblock tc39/ecma262#3102.

Concretely, the problem was that the variable def-use lint treats there exists [...] _X_ as declaring _X_, which is true for uses like there exists an integer _X_ such that or there exists an element _A_ of _B_, but not for there exists a value in _X_, which is the form in used in the relevant line in the PR.

Specifically, the line in 262 is If there exists a CharSetElement in _A_ containing exactly one character _a_ such that [...], which should use _A_ but declare _a_; prior to this PR it was treating both as declarations.

The linter wasn't tripping earlier because a separate issue in ecma262 (introduced in tc39/ecma262#2418 and fixed in tc39/ecma262#3102) caused _A_ not to be captured, which basically canceled out the bug here.

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.

2 participants