Skip to content

Commit 9321d69

Browse files
committed
JS: Add CG test showing lack of calls down to subclasses
1 parent 4043765 commit 9321d69

File tree

1 file changed

+37
-0
lines changed
  • javascript/ql/test/library-tests/CallGraphs/AnnotatedTest

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import 'dummy';
2+
3+
class Base {
4+
workInBase() {
5+
/** calls:methodInBase */
6+
this.methodInBase();
7+
8+
/** calls:NONE */
9+
this.methodInSub();
10+
}
11+
12+
/** name:methodInBase */
13+
methodInBase() {
14+
/** calls:NONE */
15+
this.methodInSub();
16+
}
17+
}
18+
19+
class Subclass1 extends Base {
20+
workInSub() {
21+
/** calls:methodInBase */
22+
this.methodInBase();
23+
}
24+
25+
methodInSub() {
26+
}
27+
}
28+
29+
class Subclass2 extends Base {
30+
workInSub() {
31+
/** calls:methodInBase */
32+
this.methodInBase();
33+
}
34+
35+
methodInSub() {
36+
}
37+
}

0 commit comments

Comments
 (0)