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 meta property symbol lookup #48773

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

weswigham
Copy link
Member

Fixes #48731

Our tests never caught the bug before we merged the checkers because there's no difference to goto-def between an outright missing symbol and a symbol with no declarations.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Apr 19, 2022
}
if (parent.keywordToken === SyntaxKind.NewKeyword) {
else if (isMetaProperty(parent) && parent.name === node) {
if (parent.keywordToken === SyntaxKind.NewKeyword && idText(node as Identifier) === "target") {
Copy link
Member Author

Choose a reason for hiding this comment

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

Driveby consistency fix for new.target as well - other new.whatevers no longer mistakenly have the new.target symbol (can be seen in some symbol baseline updates).

@@ -11,3 +11,5 @@
////}

verify.goToDefinition("reference", []);

verify.noErrors();
Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, other than the symbol baseline updates (which you could argue also showed the missing symbol problem, even if they don't call it out hard), this was all the new testing required to actually detect the issue.

@weswigham weswigham merged commit ce487e4 into microsoft:main Apr 20, 2022
Jack-Works pushed a commit to Jack-Works/TypeScript that referenced this pull request Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[4.7 Beta/Dev] import.meta reports invalid "Cannot find name 'meta' ts(2304)" error
3 participants