File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1035,14 +1035,16 @@ namespace ts.FindAllReferences.Core {
10351035 if ( ! ( isMethodOrAccessor ( member ) && hasModifier ( member , ModifierFlags . Static ) ) ) {
10361036 continue ;
10371037 }
1038- member . body ! . forEachChild ( function cb ( node ) {
1039- if ( node . kind === SyntaxKind . ThisKeyword ) {
1040- addRef ( node ) ;
1041- }
1042- else if ( ! isFunctionLike ( node ) ) {
1043- node . forEachChild ( cb ) ;
1044- }
1045- } ) ;
1038+ if ( member . body ) {
1039+ member . body . forEachChild ( function cb ( node ) {
1040+ if ( node . kind === SyntaxKind . ThisKeyword ) {
1041+ addRef ( node ) ;
1042+ }
1043+ else if ( ! isFunctionLike ( node ) ) {
1044+ node . forEachChild ( cb ) ;
1045+ }
1046+ } ) ;
1047+ }
10461048 }
10471049 }
10481050
Original file line number Diff line number Diff line change 1+ /// <reference path="fourslash.ts" />
2+
3+ ////declare class [|{| "isWriteAccess": true, "isDefinition": true |}C|] {
4+ //// static m(): void;
5+ //// }
6+
7+ verify . singleReferenceGroup ( "class C" ) ;
You can’t perform that action at this time.
0 commit comments