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

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

* Just use !isCallLikeExpression
This commit is contained in:
Andy
2018-06-25 11:33:47 -07:00
committed by GitHub
parent e8e80d2bbd
commit 9aa60f27eb
2 changed files with 5 additions and 1 deletions

View File

@@ -99,7 +99,7 @@ namespace ts.GoToDefinition {
*/
function symbolMatchesSignature(s: Symbol, calledDeclaration: SignatureDeclaration) {
return s === calledDeclaration.symbol || s === calledDeclaration.symbol.parent ||
isVariableDeclaration(calledDeclaration.parent) && s === calledDeclaration.parent.symbol;
!isCallLikeExpression(calledDeclaration.parent) && s === calledDeclaration.parent.symbol;
}
export function getReferenceAtPosition(sourceFile: SourceFile, position: number, program: Program): { fileName: string, file: SourceFile } | undefined {