mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Add support for prototype methods in class instance member resolution
This commit is contained in:
@@ -1318,7 +1318,6 @@ module ClassNode {
|
||||
)
|
||||
or
|
||||
// Function-style class methods via prototype
|
||||
astNode instanceof Function and
|
||||
kind = MemberKind::method() and
|
||||
exists(DataFlow::SourceNode proto |
|
||||
proto = this.getAPrototypeReference() and
|
||||
@@ -1361,7 +1360,6 @@ module ClassNode {
|
||||
)
|
||||
or
|
||||
// Function-style class methods via prototype
|
||||
astNode instanceof Function and
|
||||
kind = MemberKind::method() and
|
||||
exists(DataFlow::SourceNode proto |
|
||||
proto = this.getAPrototypeReference() and
|
||||
@@ -1415,7 +1413,6 @@ module ClassNode {
|
||||
* Only applies to function-style classes.
|
||||
*/
|
||||
DataFlow::SourceNode getAPrototypeReference() {
|
||||
astNode instanceof Function and
|
||||
(
|
||||
exists(DataFlow::SourceNode base | base = getAFunctionValueWithPrototype(function) |
|
||||
result = base.getAPropertyRead("prototype")
|
||||
|
||||
Reference in New Issue
Block a user