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(lint/noRedeclare): don't panic on conditional types #2664

Merged
merged 1 commit into from
May 1, 2024

Conversation

Conaclos
Copy link
Member

@Conaclos Conaclos commented May 1, 2024

Summary

Fix #2659

This is a regression introduced by #2394.
This regression makes noRedeclare panics on every conditional types with infer bindings.

noRedeclare checks the node type of every scope.
Prior to #2615, it was unlikely to retrieve the syntax node of a scope.
The semantic model builder missed many associations. I thought I added all missing associations in #2615.
However, I forgot a case: syntax node of the scope of a conditional true type.
This led to #2394.

Test Plan

I added a test.

@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Changelog Area: changelog labels May 1, 2024
@Conaclos Conaclos force-pushed the conaclos/noRedeclare/2659 branch from 4201638 to 574a56e Compare May 1, 2024 11:04
Copy link
Contributor

github-actions bot commented May 1, 2024

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 49701 49701 0
Passed 48721 48721 0
Failed 980 980 0
Panics 0 0 0
Coverage 98.03% 98.03% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6322 6322 0
Passed 2036 2036 0
Failed 4286 4286 0
Panics 0 0 0
Coverage 32.20% 32.20% 0.00%

ts/babel

Test result main count This PR count Difference
Total 662 662 0
Passed 593 593 0
Failed 69 69 0
Panics 0 0 0
Coverage 89.58% 89.58% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 17646 17646 0
Passed 13439 13439 0
Failed 4205 4205 0
Panics 2 2 0
Coverage 76.16% 76.16% 0.00%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Linter Area: linter L-JavaScript Language: JavaScript and super languages
Projects
None yet
1 participant