@@ -2805,24 +2805,9 @@ namespace ts {
28052805 return target && target . parent && target . parent . kind === kind && ( < CallExpression > target . parent ) . expression === target ;
28062806 }
28072807
2808- /** Get `C` given `N` if `N` is in the position `class C extends N` */
2809- function tryGetClassExtendingNode ( node : Node ) : ClassLikeDeclaration | undefined {
2810- const target = climbPastPropertyAccess ( node ) ;
2811-
2812- const expr = target . parent ;
2813- if ( expr . kind !== SyntaxKind . ExpressionWithTypeArguments ) {
2814- return ;
2815- }
2816-
2817- const heritageClause = expr . parent ;
2818- if ( heritageClause . kind !== SyntaxKind . HeritageClause ) {
2819- return ;
2820- }
2821-
2822- const classNode = < ClassLikeDeclaration > heritageClause . parent ;
2823- if ( getHeritageClause ( classNode . heritageClauses , SyntaxKind . ExtendsKeyword ) === heritageClause ) {
2824- return classNode ;
2825- }
2808+ /** Get `C` given `N` if `N` is in the position `class C extends N` or `class C extends foo.N` where `N` is an identifier. */
2809+ function tryGetClassExtendingIdentifier ( node : Node ) : ClassLikeDeclaration | undefined {
2810+ return tryGetClassExtendingExpressionWithTypeArguments ( climbPastPropertyAccess ( node ) . parent ) ;
28262811 }
28272812
28282813 function isNameOfModuleDeclaration ( node : Node ) {
@@ -6487,7 +6472,7 @@ namespace ts {
64876472 }
64886473 else {
64896474 // If this class appears in `extends C`, then the extending class' "super" calls are references.
6490- const classExtending = tryGetClassExtendingNode ( referenceLocation ) ;
6475+ const classExtending = tryGetClassExtendingIdentifier ( referenceLocation ) ;
64916476 if ( classExtending && isClassLike ( classExtending ) ) {
64926477 if ( getRelatedSymbol ( [ searchClassSymbol ] , referenceSymbol , referenceLocation ) ) {
64936478 const supers = superConstructorAccesses ( classExtending ) ;
0 commit comments