-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16054 from asgerf/js/call-graph-improvement2
JS: more implied receiver steps
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
javascript/ql/test/library-tests/CallGraphs/AnnotatedTest/implied-receiver.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import 'dummy'; | ||
|
||
function fooFactoryFactory() { | ||
return function fooFactory() { | ||
return function foo() { | ||
/** calls:F.member */ | ||
this.member(); | ||
} | ||
} | ||
} | ||
|
||
function F() { | ||
this.foo = fooFactoryFactory()(); | ||
} | ||
|
||
/** name:F.member */ | ||
F.prototype.member = function() { | ||
return 42; | ||
}; |