Skip to content

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Jul 26, 2025

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.

@github-actions github-actions bot added A-ast Area - AST C-bug Category - Bug labels Jul 26, 2025
Copy link
Member Author

Dunqing commented Jul 26, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Dunqing Dunqing changed the title fix(ast): correct logic in Expression::is_call_like_expression fix(ast): correct logic in Expression::is_call_like_expression Jul 26, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 26, 2025

CodSpeed Instrumentation Performance Report

Merging #12534 will not alter performance

Comparing fix/is-call-like-expression (94b06ef) with main (977d3ba)1

Summary

✅ 34 untouched benchmarks

Footnotes

  1. No successful run was found on main (abb690a) during the generation of this report, so 977d3ba was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Jul 26, 2025
Copy link
Member

Boshen commented Jul 26, 2025

Merge activity

)

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.
@graphite-app graphite-app bot force-pushed the fix/is-call-like-expression branch from 7b0aef2 to 94b06ef Compare July 26, 2025 15:38
@graphite-app graphite-app bot merged commit 94b06ef into main Jul 26, 2025
24 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 26, 2025
@graphite-app graphite-app bot deleted the fix/is-call-like-expression branch July 26, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants