JS: Removed exclusion of FunctionExpr from compound statements.

This commit is contained in:
Napalys Klicius
2025-06-02 17:35:23 +02:00
parent 1f256ab71e
commit bf48b59874
3 changed files with 3 additions and 5 deletions

View File

@@ -139,8 +139,7 @@ predicate isCompoundExpression(Expr e) {
or
e instanceof SeqExpr
or
e instanceof ParExpr and
not e.stripParens() instanceof FunctionExpr
e instanceof ParExpr
}
/**

View File

@@ -12,4 +12,3 @@
| tst.js:50:3:50:36 | new Err ... age(e)) | This expression has no effect. |
| tst.js:61:2:61:20 | o.trivialNonGetter1 | This expression has no effect. |
| tst.js:77:24:77:24 | o | This expression has no effect. |
| uselessfn.js:1:1:1:26 | (functi ... .");\\n}) | This expression has no effect. |

View File

@@ -1,3 +1,3 @@
(function f() { // $ Alert
(function f() { // $MISSING: Alert
console.log("I'm never called.");
})
})