Fixed issue where method calls weren't properly resolved when inheritance was implemented via prototype manipulation instead of ES6 class syntax.

This commit is contained in:
Napalys Klicius
2025-04-29 12:39:44 +02:00
parent a015003bda
commit 0a9a7911c2
2 changed files with 0 additions and 3 deletions

View File

@@ -1437,8 +1437,6 @@ module ClassNode {
astNode instanceof ClassDefinition and
result = astNode.(ClassDefinition).getSuperClass().flow()
or
// Function-style class superclass patterns
astNode instanceof Function and
(
// C.prototype = Object.create(D.prototype)
exists(DataFlow::InvokeNode objectCreate, DataFlow::PropRead superProto |

View File

@@ -2,7 +2,6 @@ spuriousCallee
missingCallee
| constructor-field.ts:40:5:40:14 | f3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 | calls |
| constructor-field.ts:71:1:71:11 | bf3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 | calls |
| prototypes.js:7:5:7:16 | this.greet() | prototypes.js:59:8:63:3 | () { \\n ... ); \\n } | -1 | calls |
badAnnotation
accessorCall
| accessors.js:12:1:12:5 | obj.f | accessors.js:5:8:5:12 | () {} |