10000
File tree Expand file tree Collapse file tree 2 files changed +24
-14
lines changed Expand file tree Collapse file tree 2 files changed +24
-14
lines changed Original file line number Diff line number Diff line change 1
1
/// <reference path='fourslash.ts' />
2
2
3
- ////// Not valid TS (abstract methods can only appear in abstract classes)
4
3
////class Animal {
5
4
//// [|abstract|] walk(): void;
6
5
//// [|abstract|] makeSound(): void;
7
6
//// }
8
- ////// abstract cannot appear here, won't get highlighted
9
- ////let c = /*1*/abstract class Foo {
10
- //// /*2*/abstract foo(): void;
11
- //// abstract bar(): void;
12
- //// }
13
7
14
- const ranges = test . ranges ( ) ;
15
8
9
+ // Still highlight occurrences even though abstract methods can only appear in abstract classes
10
+ const ranges = test . ranges ( ) ;
16
11
for ( let r of ranges ) {
17
12
goTo . position ( r . start ) ;
18
13
verify . occurrencesAtPositionCount ( ranges . length ) ;
19
14
20
15
for ( let range of ranges ) {
21
16
verify . occurrencesAtPositionContains ( range , false ) ;
22
17
}
23
- }
24
-
25
- goTo . marker ( "1" ) ;
26
- verify . occurrencesAtPositionCount ( 0 ) ;
27
-
28
- goTo . marker ( "2" ) ;
29
- verify . occurrencesAtPositionCount ( 2 ) ;
18
+ }
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts' />
2
+
3
+ ////// Abstract cannot appear here, won't get highlighted
4
+ ////let c = /**/abstract class Foo {
5
+ //// [|abstract|] foo(): void;
6
+ //// [|abstract|] bar(): void;
7
+ //// }
8
+
9
+ goTo . marker ( "1" ) ;
10
+ verify . occurrencesAtPositionCount ( 0 ) ;
11
+
12
+ // Still highlight occurrences even though abstract methods can only appear in abstract classes
13
+ const ranges = test . ranges ( ) ;
14
+ for ( let r of ranges ) {
15
+ goTo . position ( r . start ) ;
16
+ verify . occurrencesAtPositionCount ( ranges . length ) ;
17
+
18
+ for ( let range of ranges ) {
19
+ verify . occurrencesAtPositionContains ( range , false ) ;
20
+ }
21
+ }
You can’t perform that action at this time.
0 commit comments