File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change 1
1
/// <reference path='fourslash.ts' />
2
2
3
3
////[|abstract|] class Animal {
4
+ //// [|abstract|] prop1; // Does not compile
5
+ //// [|abstract|] abstract();
4
6
//// [|abstract|] walk(): void;
5
7
//// [|abstract|] makeSound(): void;
6
8
//// }
12
14
13
15
const ranges = test . ranges ( ) ;
14
16
15
- for ( let r of ranges ) {
17
+ for ( let r of ranges ) {
16
18
goTo . position ( r . start ) ;
17
19
verify . occurrencesAtPositionCount ( ranges . length ) ;
18
20
19
- for ( let range of ranges ) {
21
+ for ( let range of ranges ) {
20
22
verify . occurrencesAtPositionContains ( range , false ) ;
21
23
}
22
24
}
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts' />
2
+
3
+ ////// Not valid TS (abstract methods can only appear in abstract classes)
4
+ ////class Animal {
5
+ //// [|abstract|] walk(): void;
6
+ //// [|abstract|] makeSound(): void;
7
+ //// }
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
+
14
+ const ranges = test . ranges ( ) ;
15
+
16
+ for ( let r of ranges ) {
17
+ goTo . position ( r . start ) ;
18
+ verify . occurrencesAtPositionCount ( ranges . length ) ;
19
+
20
+ for ( let range of ranges ) {
21
+ verify . occurrencesAtPositionContains ( range , false ) ;
22
+ }
23
+ }
24
+
25
+ goTo . marker ( "1" ) ;
26
+ verify . occurrencesAtPositionCount ( 0 ) ;
27
+
28
+ goTo . marker ( "2" ) ;
29
+ verify . occurrencesAtPositionCount ( 2 ) ;
You can’t perform that action at this time.
0 commit comments