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
|
||||
// anonymous one-shot closure. Those are used in weird ways and we ignore them.
|
||||
not oneshotClosure(call) and
|
||||
not hasNonVoidReturnType(func)
|
||||
not hasNonVoidReturnType(func) and
|
||||
not call.getEnclosingExpr() instanceof SuperCall
|
||||
select
|
||||
call, msg, func, name
|
||||
|
||||
@@ -93,3 +93,15 @@
|
||||
+function() {
|
||||
console.log("FOO");
|
||||
}.call(this);
|
||||
|
||||
class Foo {
|
||||
constructor() {
|
||||
console.log("FOO");
|
||||
}
|
||||
}
|
||||
|
||||
class Bar extends Foo {
|
||||
constructor() {
|
||||
console.log(super()); // OK.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user