mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
remove FP in use-of-returnless-function FP related to calls to super()
This commit is contained in:
@@ -222,6 +222,7 @@ where
|
|||||||
not lastStatementHasNoEffect(func) and
|
not lastStatementHasNoEffect(func) and
|
||||||
// anonymous one-shot closure. Those are used in weird ways and we ignore them.
|
// anonymous one-shot closure. Those are used in weird ways and we ignore them.
|
||||||
not oneshotClosure(call) and
|
not oneshotClosure(call) and
|
||||||
not hasNonVoidReturnType(func)
|
not hasNonVoidReturnType(func) and
|
||||||
|
not call.getEnclosingExpr() instanceof SuperCall
|
||||||
select
|
select
|
||||||
call, msg, func, name
|
call, msg, func, name
|
||||||
|
|||||||
@@ -93,3 +93,15 @@
|
|||||||
+function() {
|
+function() {
|
||||||
console.log("FOO");
|
console.log("FOO");
|
||||||
}.call(this);
|
}.call(this);
|
||||||
|
|
||||||
|
class Foo {
|
||||||
|
constructor() {
|
||||||
|
console.log("FOO");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Bar extends Foo {
|
||||||
|
constructor() {
|
||||||
|
console.log(super()); // OK.
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user