Commit 94b06ef
committed
fix(ast): correct logic in
The `is_call_like_expression` function is intended to identify expressions that are function calls, new expressions, or import expressions. The previous implementation incorrectly used a logical AND (`&&`) to combine these checks. This would always evaluate to false, since an expression cannot be a `CallExpression` *and* a `NewExpression` or `ImportExpression` simultaneously.
This pull request corrects the logic by replacing the logical AND (`&&`) with a logical OR (`||`). This ensures the function accurately returns `true` if an expression is any of the call-like types, aligning with its intended purpose.Expression::is_call_like_expression (#12534)1 parent abb690a commit 94b06ef
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
| 344 | + | |
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| |||
0 commit comments