fix(52664): Assertion failure on completions for derived class with computed base property name (#52673)

This commit is contained in:
Oleksandr T
2023-02-17 17:36:52 -08:00
committed by GitHub
parent 04637662f4
commit bbb98cf797
6 changed files with 314 additions and 27 deletions
+1 -1
View File
@@ -287,7 +287,7 @@ function stringLiteralCompletionDetails(name: string, location: Node, completion
}
case StringLiteralCompletionKind.Properties: {
const match = find(completion.symbols, s => s.name === name);
return match && createCompletionDetailsForSymbol(match, checker, sourceFile, location, cancellationToken);
return match && createCompletionDetailsForSymbol(match, match.name, checker, sourceFile, location, cancellationToken);
}
case StringLiteralCompletionKind.Types:
return find(completion.types, t => t.value === name) ? createCompletionDetails(name, ScriptElementKindModifier.none, ScriptElementKind.string, [textPart(name)]) : undefined;