Skip to content

feat(semantic): report error for await using in class static block#20535

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/03-19-feat_semantic_report_error_for_await_using_in_class_static_block
Mar 19, 2026
Merged

feat(semantic): report error for await using in class static block#20535
graphite-app[bot] merged 1 commit intomainfrom
c/03-19-feat_semantic_report_error_for_await_using_in_class_static_block

Conversation

@camc314
Copy link
Copy Markdown
Contributor

@camc314 camc314 commented Mar 19, 2026

No description provided.

@github-actions github-actions bot added the A-semantic Area - Semantic label Mar 19, 2026
Copy link
Copy Markdown
Contributor Author

camc314 commented Mar 19, 2026


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 changes, fast-track this PR to the front of the merge queue

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.

@github-actions github-actions bot added the C-enhancement Category - New feature or request label Mar 19, 2026
@camc314 camc314 marked this pull request as ready for review March 19, 2026 21:40
@camc314 camc314 requested a review from Dunqing as a code owner March 19, 2026 21:40
Copilot AI review requested due to automatic review settings March 19, 2026 21:40
@camc314 camc314 self-assigned this Mar 19, 2026
@graphite-app graphite-app bot changed the base branch from c/03-19-feat_parser_improve_diagnostic_for_await_in_static_block to graphite-base/20535 March 19, 2026 21:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new semantic diagnostic to report an error when await using is used inside a class static initialization block, and updates the TypeScript parser coverage snapshot accordingly.

Changes:

  • Introduce a new OxcDiagnostic constructor for await using in class static blocks.
  • Add a semantic check in the JS/TS semantic checker to emit that diagnostic for VariableDeclarationKind::AwaitUsing within class static blocks.
  • Update the TypeScript coverage snapshot to reflect the newly reported error and the updated negative-pass count.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
tasks/coverage/snapshots/parser_typescript.snap Snapshot updates to reflect the new diagnostic output and updated stats.
crates/oxc_semantic/src/diagnostics.rs Adds a new diagnostic message for await using in class static blocks.
crates/oxc_semantic/src/checker/javascript.rs Emits the new diagnostic when encountering await using in class static blocks.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 19, 2026

Merging this PR will not alter performance

✅ 53 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing c/03-19-feat_semantic_report_error_for_await_using_in_class_static_block (07128b0) with main (728fc8d)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@camc314 camc314 force-pushed the c/03-19-feat_semantic_report_error_for_await_using_in_class_static_block branch from 9c53821 to 515873b Compare March 19, 2026 21:47
@camc314 camc314 force-pushed the graphite-base/20535 branch from fe03b1b to 728fc8d Compare March 19, 2026 21:47
@camc314 camc314 changed the base branch from graphite-base/20535 to c/03-19-feat_parser_improve_diagnostic_for_await_in_static_block March 19, 2026 21:47
@camc314 camc314 requested a review from Copilot March 19, 2026 21:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.

Base automatically changed from c/03-19-feat_parser_improve_diagnostic_for_await_in_static_block to main March 19, 2026 21:55
@camc314 camc314 force-pushed the c/03-19-feat_semantic_report_error_for_await_using_in_class_static_block branch from 515873b to b0eafaa Compare March 19, 2026 22:00
@camc314 camc314 removed their assignment Mar 19, 2026
@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app bot commented Mar 19, 2026

Merge activity

@graphite-app graphite-app bot force-pushed the c/03-19-feat_semantic_report_error_for_await_using_in_class_static_block branch from b0eafaa to 07128b0 Compare March 19, 2026 22:11
@graphite-app graphite-app bot merged commit 07128b0 into main Mar 19, 2026
30 checks passed
@graphite-app graphite-app bot deleted the c/03-19-feat_semantic_report_error_for_await_using_in_class_static_block branch March 19, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-semantic Area - Semantic C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants