mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 10:00:13 -06:00
Merge pull request #6507 from JKillian/fix-prop-bug
Fix issue #6478 (bug in the language services)
This commit is contained in:
commit
4673b57163
@ -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:
|
||||
@ -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));
|
||||
|
||||
@ -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"]);
|
||||
Loading…
x
Reference in New Issue
Block a user