Skip to content

Commit fc47329

Browse files
committed
PR feedback for abstract keyword occurrences
1 parent 758abff commit fc47329

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/services/services.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4694,7 +4694,8 @@ namespace ts {
46944694
if (!(container.kind === SyntaxKind.ModuleBlock || container.kind === SyntaxKind.SourceFile)) {
46954695
return undefined;
46964696
}
4697-
} else if (modifier === SyntaxKind.AbstractKeyword) {
4697+
}
4698+
else if (modifier === SyntaxKind.AbstractKeyword) {
46984699
if (!(container.kind === SyntaxKind.ClassDeclaration || declaration.kind === SyntaxKind.ClassDeclaration)) {
46994700
return undefined;
47004701
}

tests/cases/fourslash/getOccurrencesAbstract.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
//// abstract bar(): void;
1111
////}
1212

13-
test.ranges().forEach(r => {
13+
const ranges = test.ranges();
14+
15+
for(let r of ranges) {
1416
goTo.position(r.start);
15-
verify.occurrencesAtPositionCount(test.ranges().length);
17+
verify.occurrencesAtPositionCount(ranges.length);
1618

17-
test.ranges().forEach(range => {
19+
for(let range of ranges) {
1820
verify.occurrencesAtPositionContains(range, false);
19-
});
20-
});
21+
}
22+
}

0 commit comments

Comments
 (0)