Skip to content

Commit 72e194e

Browse files
committed
Removed code duplication
1 parent 12fd77f commit 72e194e

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

javascript/ql/lib/semmle/javascript/dataflow/Nodes.qll

-14
Original file line numberDiff line numberDiff line change
@@ -995,20 +995,6 @@ class ClassNode extends DataFlow::ValueNode, DataFlow::SourceNode {
995995
result = method.getBody().flow()
996996
)
997997
or
998-
// ES6 class property or Function-style class methods via constructor
999-
kind = MemberKind::method() and
1000-
exists(ThisNode receiver |
1001-
receiver = this.getConstructor().getReceiver() and
1002-
result = receiver.getAPropertySource()
1003-
)
1004-
or
1005-
// Function-style class methods via prototype
1006-
kind = MemberKind::method() and
1007-
exists(DataFlow::SourceNode proto |
1008-
proto = this.getAPrototypeReference() and
1009-
result = proto.getAPropertySource()
1010-
)
1011-
or
1012998
// Function-style class accessors
1013999
astNode instanceof Function and
10141000
exists(PropertyAccessor accessor |

javascript/ql/test/library-tests/Classes/tests.expected

-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ test_ConstructorDefinitions
194194
| tst.js:11:9:11:8 | constructor() {} |
195195
test_ClassNodeConstructor
196196
| dataflow.js:4:2:13:2 | class F ... \\n\\t\\t}\\n\\t} | dataflow.js:4:12:4:11 | () {} |
197-
| dataflow.js:4:12:4:11 | () {} | dataflow.js:4:12:4:11 | () {} |
198197
| fields.js:1:1:4:1 | class C ... = 42\\n} | fields.js:1:9:1:8 | () {} |
199198
| points.js:1:1:18:1 | class P ... ;\\n }\\n} | points.js:2:14:5:3 | (x, y) ... y;\\n } |
200199
| points.js:20:1:33:1 | class C ... ;\\n }\\n} | points.js:21:14:24:3 | (x, y, ... c;\\n } |

0 commit comments

Comments
 (0)