Skip to content

Commit f2939bd

Browse files
committed
JS: Add test case
1 parent a950de3 commit f2939bd

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

javascript/ql/test/library-tests/CallGraphs/AnnotatedTest/Test.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ spuriousCallee
22
missingCallee
33
| constructor-field.ts:40:5:40:14 | f3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 | calls |
44
| constructor-field.ts:71:1:71:11 | bf3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 | calls |
5+
| implied-receiver.js:7:13:7:25 | this.member() | implied-receiver.js:17:22:19:1 | functio ... n 42;\\n} | -1 | calls |
56
badAnnotation
67
accessorCall
78
| accessors.js:12:1:12:5 | obj.f | accessors.js:5:8:5:12 | () {} |
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import 'dummy';
2+
3+
function fooFactoryFactory() {
4+
return function fooFactory() {
5+
return function foo() {
6+
/** calls:F.member */
7+
this.member();
8+
}
9+
}
10+
}
11+
12+
function F() {
13+
this.foo = fooFactoryFactory()();
14+
}
15+
16+
/** name:F.member */
17+
F.prototype.member = function() {
18+
return 42;
19+
};

0 commit comments

Comments
 (0)