addClassStaticThisReferences: Don't cross class boundary (#24860)
This commit is contained in:
parent
e5597eec81
commit
1aad3c6273
|
@ -1040,7 +1040,7 @@ namespace ts.FindAllReferences.Core {
|
|||
if (node.kind === SyntaxKind.ThisKeyword) {
|
||||
addRef(node);
|
||||
}
|
||||
else if (!isFunctionLike(node)) {
|
||||
else if (!isFunctionLike(node) && !isClassLike(node)) {
|
||||
node.forEachChild(cb);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -4,7 +4,12 @@
|
|||
//// static s() {
|
||||
//// [|this|];
|
||||
//// }
|
||||
//// static get f() { return [|this|]; }
|
||||
//// static get f() {
|
||||
//// return [|this|];
|
||||
////
|
||||
//// function inner() { this; }
|
||||
//// class Inner { x = this; }
|
||||
//// }
|
||||
////}
|
||||
|
||||
const [r0, r1, r2] = test.ranges();
|
||||
|
|
Loading…
Reference in a new issue