+
Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_js_semantic): add TsTypeParameterName to bindings #4259

Merged
merged 1 commit into from
Mar 4, 2023

Conversation

ematipico
Copy link
Contributor

@ematipico ematipico commented Mar 4, 2023

Summary

When #4053 was merged, it unveiled an issue in our semantic model.

The CI didn't fail because it doesn't run some script, but the command check was failing on such codes:

type P = {
	[key in P]: D
}

This PR fixes the issue, where we track key as bindings.

Test Plan

Added a new test case

Documentation

  • The PR requires documentation
  • I will create a new PR to update the documentation

@netlify
Copy link

netlify bot commented Mar 4, 2023

Deploy Preview for docs-rometools canceled.

Name Link
🔨 Latest commit c864470
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/6403d591197c2a00082cb14d

@github-actions
Copy link

github-actions bot commented Mar 4, 2023

Parser conformance results on ubuntu-latest

js/262

Test result main count This PR count Difference
Total 48647 48647 0
Passed 47582 47582 0
Failed 1065 1065 0
Panics 0 0 0
Coverage 97.81% 97.81% 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 6093 6093 0
Passed 1783 1783 0
Failed 4310 4310 0
Panics 0 0 0
Coverage 29.26% 29.26% 0.00%

ts/babel

Test result main count This PR count Difference
Total 639 639 0
Passed 568 568 0
Failed 71 71 0
Panics 0 0 0
Coverage 88.89% 88.89% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 16740 16740 0
Passed 12815 12815 0
Failed 3925 3925 0
Panics 0 0 0
Coverage 76.55% 76.55% 0.00%

@ematipico ematipico force-pushed the fix/semantic-model branch from 6d1fa5c to 003176e Compare March 4, 2023 23:28
if binding
.syntax()
.ancestors()
.find(|node| TsMethodSignatureClassMember::can_cast(node.kind()))
Copy link
Contributor Author

@ematipico ematipico Mar 4, 2023

Choose a reason for hiding this comment

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

Function overloadings belong to the same scope, and bindings inside function overloadings should be ignored when checking for re-declarations.

@ematipico ematipico force-pushed the fix/semantic-model branch from 003176e to c864470 Compare March 4, 2023 23:34
@ematipico ematipico merged commit 46935ac into main Mar 4, 2023
@ematipico ematipico deleted the fix/semantic-model branch March 4, 2023 23:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载