feat(semantic): report error for await using in class static block#20535
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via 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. |
There was a problem hiding this comment.
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
OxcDiagnosticconstructor forawait usingin class static blocks. - Add a semantic check in the JS/TS semantic checker to emit that diagnostic for
VariableDeclarationKind::AwaitUsingwithin 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. |
Merging this PR will not alter performance
Comparing Footnotes
|
9c53821 to
515873b
Compare
fe03b1b to
728fc8d
Compare
515873b to
b0eafaa
Compare
Merge activity
|
b0eafaa to
07128b0
Compare

No description provided.