mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Update Nodes.qll
Applied suggestions Co-Authored-By: Asger F <316427+asgerf@users.noreply.github.com>
This commit is contained in:
@@ -1242,11 +1242,12 @@ module ClassNode {
|
||||
*/
|
||||
class FunctionStyleClass extends Range, DataFlow::ValueNode {
|
||||
override AST::ValueNode astNode;
|
||||
AbstractFunction function;
|
||||
AbstractCallable function;
|
||||
|
||||
FunctionStyleClass() {
|
||||
// ES6 class case
|
||||
astNode instanceof ClassDefinition
|
||||
astNode instanceof ClassDefinition and
|
||||
function.(AbstractClass).getClass() = astNode
|
||||
or
|
||||
// Function-style class case
|
||||
astNode instanceof Function and
|
||||
|
||||
@@ -194,6 +194,7 @@ test_ConstructorDefinitions
|
||||
| tst.js:11:9:11:8 | constructor() {} |
|
||||
test_ClassNodeConstructor
|
||||
| dataflow.js:4:2:13:2 | class F ... \\n\\t\\t}\\n\\t} | dataflow.js:4:12:4:11 | () {} |
|
||||
| dataflow.js:4:12:4:11 | () {} | dataflow.js:4:12:4:11 | () {} |
|
||||
| fields.js:1:1:4:1 | class C ... = 42\\n} | fields.js:1:9:1:8 | () {} |
|
||||
| points.js:1:1:18:1 | class P ... ;\\n }\\n} | points.js:2:14:5:3 | (x, y) ... y;\\n } |
|
||||
| points.js:20:1:33:1 | class C ... ;\\n }\\n} | points.js:21:14:24:3 | (x, y, ... c;\\n } |
|
||||
|
||||
Reference in New Issue
Block a user