@@ -6463,7 +6463,7 @@ namespace ts {
6463
6463
if ( referenceSymbol === searchSymbol && isClassLike ( referenceClass ) ) {
6464
6464
Debug . assert ( referenceClass . name === referenceLocation ) ;
6465
6465
// This is the class declaration containing the constructor.
6466
- addReferences ( findOwnConstructorCalls ( referenceSymbol , referenceClass ) ) ;
6466
+ addReferences ( findOwnConstructorCalls ( searchSymbol ) ) ;
6467
6467
}
6468
6468
else {
6469
6469
// If this class appears in `extends C`, then the extending class' "super" calls are references.
@@ -6481,20 +6481,20 @@ namespace ts {
6481
6481
}
6482
6482
}
6483
6483
6484
- /** `referenceLocation ` is the class where the constructor was defined.
6484
+ /** `classSymbol ` is the class where the constructor was defined.
6485
6485
* Reference the constructor and all calls to `new this()`.
6486
6486
*/
6487
- function findOwnConstructorCalls ( referenceSymbol : Symbol , referenceLocation : ClassLikeDeclaration ) : Node [ ] {
6487
+ function findOwnConstructorCalls ( classSymbol : Symbol ) : Node [ ] {
6488
6488
const result : Node [ ] = [ ] ;
6489
6489
6490
- for ( const decl of referenceSymbol . members [ "__constructor" ] . declarations ) {
6490
+ for ( const decl of classSymbol . members [ "__constructor" ] . declarations ) {
6491
6491
Debug . assert ( decl . kind === SyntaxKind . Constructor ) ;
6492
6492
const ctrKeyword = decl . getChildAt ( 0 ) ;
6493
6493
Debug . assert ( ctrKeyword . kind === SyntaxKind . ConstructorKeyword ) ;
6494
6494
result . push ( ctrKeyword ) ;
6495
6495
}
6496
6496
6497
- forEachProperty ( referenceSymbol . exports , member => {
6497
+ forEachProperty ( classSymbol . exports , member => {
6498
6498
const decl = member . valueDeclaration ;
6499
6499
if ( decl && decl . kind === SyntaxKind . MethodDeclaration ) {
6500
6500
const body = ( < MethodDeclaration > decl ) . body ;
0 commit comments