Skip to content

Commit 131ac2f

Browse files
Disabled findAllRefs for 'this'/'super'.
1 parent 1cd0b30 commit 131ac2f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/services/services.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,8 +2378,9 @@ module ts {
23782378
}
23792379

23802380
if (node.kind !== SyntaxKind.Identifier &&
2381-
node.kind !== SyntaxKind.ThisKeyword &&
2382-
node.kind !== SyntaxKind.SuperKeyword &&
2381+
// TODO (drosen): This should be enabled in a later release - currently breaks rename.
2382+
//node.kind !== SyntaxKind.ThisKeyword &&
2383+
//node.kind !== SyntaxKind.SuperKeyword &&
23832384
!isLiteralNameOfPropertyDeclarationOrIndexAccess(node) &&
23842385
!isNameOfExternalModuleImportOrDeclaration(node)) {
23852386
return undefined;

tests/cases/fourslash/findAllRefsThisKeywordMultipleFiles.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@
1212

1313
goTo.file("file1.ts");
1414
goTo.marker();
15-
verify.referencesCountIs(8);
15+
16+
// TODO (drosen): The CURRENT behavior is that findAllRefs doesn't work on 'this' or 'super' keywords.
17+
// This should change down the line.
18+
verify.referencesCountIs(0);

0 commit comments

Comments
 (0)