Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cf92022 + 4efc71b commit fb44aa1Copy full SHA for fb44aa1
2 files changed
javascript/ql/src/Statements/UseOfReturnlessFunction.ql
@@ -222,6 +222,7 @@ where
222
not lastStatementHasNoEffect(func) and
223
// anonymous one-shot closure. Those are used in weird ways and we ignore them.
224
not oneshotClosure(call) and
225
- not hasNonVoidReturnType(func)
+ not hasNonVoidReturnType(func) and
226
+ not call.getEnclosingExpr() instanceof SuperCall
227
select
228
call, msg, func, name
javascript/ql/test/query-tests/Statements/UseOfReturnlessFunction/tst.js
@@ -92,4 +92,16 @@
92
93
+function() {
94
console.log("FOO");
95
-}.call(this);
+}.call(this);
96
+
97
+class Foo {
98
+ constructor() {
99
+ console.log("FOO");
100
+ }
101
+}
102
103
+class Bar extends Foo {
104
105
+ console.log(super()); // OK.
106
107
0 commit comments