Fixed a crash when getting document highlights on out variance annotation (#56408)

This commit is contained in:
Mateusz Burzyński
2023-11-15 20:34:59 +01:00
committed by GitHub
parent e170bc59d4
commit d1d14e67d0
3 changed files with 18 additions and 0 deletions

View File

@@ -178,6 +178,7 @@ export namespace DocumentHighlights {
case SyntaxKind.YieldKeyword:
return highlightSpans(getYieldOccurrences(node));
case SyntaxKind.InKeyword:
case SyntaxKind.OutKeyword:
return undefined;
default:
return isModifierKind(node.kind) && (isDeclaration(node.parent) || isVariableStatement(node.parent))