Skip to content

goToDefinition: Don't add duplicate definitions for PropertyAssignment and ArrowFunction at m: () => {}#24995

Merged
2 commits merged into
masterfrom
goToDefinitionSignatureAlias_propertyAssignment
Jun 25, 2018
Merged

goToDefinition: Don't add duplicate definitions for PropertyAssignment and ArrowFunction at m: () => {}#24995
2 commits merged into
masterfrom
goToDefinitionSignatureAlias_propertyAssignment

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jun 15, 2018

Sequel to #24863
Fixes an issue identified in #24809

Comment thread src/services/goToDefinition.ts Outdated
function symbolMatchesSignature(s: Symbol, calledDeclaration: SignatureDeclaration) {
return s === calledDeclaration.symbol || s === calledDeclaration.symbol.parent ||
isVariableDeclaration(calledDeclaration.parent) && s === calledDeclaration.parent.symbol;
(isVariableDeclaration(calledDeclaration.parent) || isPropertyAssignment(calledDeclaration.parent)) && s === calledDeclaration.parent.symbol;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

would not it be better to check if the parent is callExpression or newExpression?

@ghost
Copy link
Copy Markdown
Author

ghost commented Jun 25, 2018

Test failure fixed by #25199

@ghost ghost merged commit 9aa60f2 into master Jun 25, 2018
@ghost ghost deleted the goToDefinitionSignatureAlias_propertyAssignment branch June 25, 2018 18:33
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
This pull request was closed.
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