mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Fix class instance method detection in constructor receiver
This commit is contained in:
@@ -1330,6 +1330,9 @@ module ClassNode {
|
||||
accessor.getName() = name and
|
||||
result = accessor.getInit().flow()
|
||||
)
|
||||
or
|
||||
kind = MemberKind::method() and
|
||||
result = this.getConstructor().getReceiver().getAPropertySource(name)
|
||||
}
|
||||
|
||||
override FunctionNode getAnInstanceMember(MemberKind kind) {
|
||||
@@ -1362,6 +1365,9 @@ module ClassNode {
|
||||
accessor = this.getAnAccessor(kind) and
|
||||
result = accessor.getInit().flow()
|
||||
)
|
||||
or
|
||||
kind = MemberKind::method() and
|
||||
result = this.getConstructor().getReceiver().getAPropertySource()
|
||||
}
|
||||
|
||||
override FunctionNode getStaticMember(string name, MemberKind kind) {
|
||||
|
||||
@@ -2,8 +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:117:5:117:19 | this.tmpClass() | prototypes.js:113:1:113:22 | functio ... ss() {} | -1 | calls |
|
||||
| prototypes.js:131:5:131:23 | this.tmpPrototype() | prototypes.js:127:1:127:26 | functio ... pe() {} | -1 | calls |
|
||||
badAnnotation
|
||||
accessorCall
|
||||
| accessors.js:12:1:12:5 | obj.f | accessors.js:5:8:5:12 | () {} |
|
||||
|
||||
Reference in New Issue
Block a user