Skip to content

Commit 0a9a791

Browse files
committed
Fixed issue where method calls weren't properly resolved when inheritance was implemented via prototype manipulation instead of ES6 class syntax.
1 parent a015003 commit 0a9a791

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

javascript/ql/lib/semmle/javascript/dataflow/Nodes.qll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,8 +1437,6 @@ module ClassNode {
14371437
astNode instanceof ClassDefinition and
14381438
result = astNode.(ClassDefinition).getSuperClass().flow()
14391439
or
1440-
// Function-style class superclass patterns
1441-
astNode instanceof Function and
14421440
(
14431441
// C.prototype = Object.create(D.prototype)
14441442
exists(DataFlow::InvokeNode objectCreate, DataFlow::PropRead superProto |

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ 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-
| prototypes.js:7:5:7:16 | this.greet() | prototypes.js:59:8:63:3 | () { \\n ... ); \\n } | -1 | calls |
65
badAnnotation
76
accessorCall
87
| accessors.js:12:1:12:5 | obj.f | accessors.js:5:8:5:12 | () {} |

0 commit comments

Comments
 (0)