mirror of
https://github.com/github/codeql.git
synced 2026-02-17 15:33:45 +01:00
Removed code duplication
This commit is contained in:
@@ -1309,8 +1309,7 @@ module ClassNode {
|
||||
result = method.getBody().flow()
|
||||
)
|
||||
or
|
||||
// ES6 class property in constructor
|
||||
astNode instanceof ClassDefinition and
|
||||
// ES6 class property or Function-style class methods via constructor
|
||||
kind = MemberKind::method() and
|
||||
exists(ThisNode receiver |
|
||||
receiver = this.getConstructor().getReceiver() and
|
||||
@@ -1324,14 +1323,6 @@ module ClassNode {
|
||||
proto.hasPropertyWrite(name, result)
|
||||
)
|
||||
or
|
||||
// Function-style class methods via constructor
|
||||
astNode instanceof Function and
|
||||
kind = MemberKind::method() and
|
||||
exists(ThisNode receiver |
|
||||
receiver = this.getConstructor().getReceiver() and
|
||||
receiver.hasPropertyWrite(name, result)
|
||||
)
|
||||
or
|
||||
// Function-style class accessors
|
||||
astNode instanceof Function and
|
||||
exists(PropertyAccessor accessor |
|
||||
@@ -1351,8 +1342,7 @@ module ClassNode {
|
||||
result = method.getBody().flow()
|
||||
)
|
||||
or
|
||||
// ES6 class property in constructor
|
||||
astNode instanceof ClassDefinition and
|
||||
// ES6 class property or Function-style class methods via constructor
|
||||
kind = MemberKind::method() and
|
||||
exists(ThisNode receiver |
|
||||
receiver = this.getConstructor().getReceiver() and
|
||||
@@ -1366,14 +1356,6 @@ module ClassNode {
|
||||
result = proto.getAPropertySource()
|
||||
)
|
||||
or
|
||||
// Function-style class methods via constructor
|
||||
astNode instanceof Function and
|
||||
kind = MemberKind::method() and
|
||||
exists(ThisNode receiver |
|
||||
receiver = this.getConstructor().getReceiver() and
|
||||
result = receiver.getAPropertySource()
|
||||
)
|
||||
or
|
||||
// Function-style class accessors
|
||||
astNode instanceof Function and
|
||||
exists(PropertyAccessor accessor |
|
||||
|
||||
Reference in New Issue
Block a user