File tree Expand file tree Collapse file tree 3 files changed +111
-0
lines changed Expand file tree Collapse file tree 3 files changed +111
-0
lines changed Original file line number Diff line number Diff line change @@ -5885,6 +5885,7 @@ namespace ts {
5885
5885
result . push ( getReferenceEntryFromNode ( node ) ) ;
5886
5886
}
5887
5887
break ;
5888
+ case SyntaxKind . ClassExpression :
5888
5889
case SyntaxKind . ClassDeclaration :
5889
5890
// Make sure the container belongs to the same class
5890
5891
// and has the appropriate static modifier from the original container.
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts' />
2
+
3
+ ////var x = class C {
4
+ //// public x;
5
+ //// public y;
6
+ //// public z;
7
+ //// public staticX;
8
+ //// constructor() {
9
+ //// this;
10
+ //// this.x;
11
+ //// this.y;
12
+ //// this.z;
13
+ //// }
14
+ //// foo() {
15
+ //// this;
16
+ //// () => this;
17
+ //// () => {
18
+ //// if (this) {
19
+ //// this;
20
+ //// }
21
+ //// }
22
+ //// function inside() {
23
+ //// this;
24
+ //// (function (_) {
25
+ //// this;
26
+ //// })(this);
27
+ //// }
28
+ //// return this.x;
29
+ //// }
30
+ ////
31
+ //// static bar() {
32
+ //// [|this|];
33
+ //// [|this|].staticX;
34
+ //// () => [|this|];
35
+ //// () => {
36
+ //// if ([|this|]) {
37
+ //// [|this|];
38
+ //// }
39
+ //// }
40
+ //// function inside() {
41
+ //// this;
42
+ //// (function (_) {
43
+ //// this;
44
+ //// })(this);
45
+ //// }
46
+ //// }
47
+ //// }
48
+
49
+ const ranges = test . ranges ( ) ;
50
+ for ( let r of ranges ) {
51
+ goTo . position ( r . start ) ;
52
+
53
+ for ( let range of ranges ) {
54
+ verify . occurrencesAtPositionContains ( range , false ) ;
55
+ }
56
+ }
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts' />
2
+
3
+ ////var x = class C {
4
+ //// public x;
5
+ //// public y;
6
+ //// public z;
7
+ //// constructor() {
8
+ //// [|this|];
9
+ //// [|this|].x;
10
+ //// [|this|].y;
11
+ //// [|this|].z;
12
+ //// }
13
+ //// foo() {
14
+ //// [|this|];
15
+ //// () => [|this|];
16
+ //// () => {
17
+ //// if ([|this|]) {
18
+ //// [|this|];
19
+ //// }
20
+ //// }
21
+ //// function inside() {
22
+ //// this;
23
+ //// (function (_) {
24
+ //// this;
25
+ //// })(this);
26
+ //// }
27
+ //// return [|this|].x;
28
+ //// }
29
+ ////
30
+ //// static bar() {
31
+ //// this;
32
+ //// () => this;
33
+ //// () => {
34
+ //// if (this) {
35
+ //// this;
36
+ //// }
37
+ //// }
38
+ //// function inside() {
39
+ //// this;
40
+ //// (function (_) {
41
+ //// this;
42
+ //// })(this);
43
+ //// }
44
+ //// }
45
+ //// }
46
+
47
+ const ranges = test . ranges ( ) ;
48
+ for ( let r of ranges ) {
49
+ goTo . position ( r . start ) ;
50
+
51
+ for ( let range of ranges ) {
52
+ verify . occurrencesAtPositionContains ( range , false ) ;
53
+ }
54
+ }
You can’t perform that action at this time.
0 commit comments