Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/services/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6028,6 +6028,10 @@ namespace ts {
*/
function getPropertySymbolsFromBaseTypes(symbol: Symbol, propertyName: string, result: Symbol[],
previousIterationSymbolsCache: SymbolTable): void {
if (!symbol) {
return;
}

// If the current symbol is the same as the previous-iteration symbol, we can just return the symbol that has already been visited
// This is particularly important for the following cases, so that we do not infinitely visit the same symbol.
// For example:
Expand All @@ -6043,7 +6047,7 @@ namespace ts {
return;
}

if (symbol && symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) {
if (symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) {
forEach(symbol.getDeclarations(), declaration => {
if (declaration.kind === SyntaxKind.ClassDeclaration) {
getPropertySymbolFromTypeReference(getClassExtendsHeritageClauseElement(<ClassDeclaration>declaration));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/// <reference path='fourslash.ts'/>

// @Filename: file1.ts
//// class ClassA implements IInterface {
//// private /*1*/value: number;
//// }

goTo.marker("1");
verify.documentHighlightsAtPositionCount(1, ["file1.ts"]);