File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
javascript/ql/test/library-tests/CallGraphs/AnnotatedTest Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ spuriousCallee
22missingCallee
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+ | prototypes.js:117:5:117:19 | this.tmpClass() | prototypes.js:113:1:113:22 | functio ... ss() {} | -1 | calls |
6+ | prototypes.js:131:5:131:23 | this.tmpPrototype() | prototypes.js:127:1:127:26 | functio ... pe() {} | -1 | calls |
57badAnnotation
68accessorCall
79| accessors.js:12:1:12:5 | obj.f | accessors.js:5:8:5:12 | () {} |
Original file line number Diff line number Diff line change @@ -107,3 +107,36 @@ class Derived2 {}
107107Derived2 . prototype = Object . create ( Base . prototype ) ;
108108/** name:Derived2.read */
109109Derived2 . prototype . read = function ( ) { } ;
110+
111+
112+ /** name:BanClass.tmpClass */
113+ function tmpClass ( ) { }
114+
115+ function callerClass ( ) {
116+ /** calls:BanClass.tmpClass */
117+ this . tmpClass ( ) ;
118+ }
119+ class BanClass {
120+ constructor ( ) {
121+ this . tmpClass = tmpClass ;
122+ this . callerClass = callerClass ;
123+ }
124+ }
125+
126+ /** name:BanProtytpe.tmpPrototype */
127+ function tmpPrototype ( ) { }
128+
129+ function callerPrototype ( ) {
130+ /** calls:BanProtytpe.tmpPrototype */
131+ this . tmpPrototype ( ) ;
132+ }
133+
134+ function BanProtytpe ( ) {
135+ this . tmpPrototype = tmpPrototype ;
136+ this . callerPrototype = callerPrototype ;
137+ }
138+
139+ function banInstantiation ( ) {
140+ const instance = new BanProtytpe ( ) ;
141+ instance . callerPrototype ( ) ;
142+ }
You can’t perform that action at this time.
0 commit comments