@@ -2805,24 +2805,9 @@ namespace ts {
2805
2805
return target && target . parent && target . parent . kind === kind && ( < CallExpression > target . parent ) . expression === target ;
2806
2806
}
2807
2807
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 ) ;
2826
2811
}
2827
2812
2828
2813
function isNameOfModuleDeclaration ( node : Node ) {
@@ -6487,7 +6472,7 @@ namespace ts {
6487
6472
}
6488
6473
else {
6489
6474
// 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 ) ;
6491
6476
if ( classExtending && isClassLike ( classExtending ) ) {
6492
6477
if ( getRelatedSymbol ( [ searchClassSymbol ] , referenceSymbol , referenceLocation ) ) {
6493
6478
const supers = superConstructorAccesses ( classExtending ) ;
0 commit comments