Skip to content

Bail out on using declarations in HIR#36691

Open
magic-akari wants to merge 1 commit into
facebook:mainfrom
magic-akari:fix/react-compiler-using
Open

Bail out on using declarations in HIR#36691
magic-akari wants to merge 1 commit into
facebook:mainfrom
magic-akari:fix/react-compiler-using

Conversation

@magic-akari
Copy link
Copy Markdown

@magic-akari magic-akari commented Jun 5, 2026

Summary

Emit Todo diagnostics for using and await using declarations instead of silently treating them as ordinary const declarations. Enable explicit resource management parsing in compiler test entrypoints and add snap fixtures covering using and await using bailouts.

Snapshots

image

The using syntax now throws an expected error, consistent with the behavior of var.

How did you test this change?

cd compiler
yarn install --frozen-lockfile
yarn snap:build
yarn snap -u -p "error.todo-*using-declaration" --sync
yarn snap -p "error.todo-*using-declaration" --sync

@meta-cla meta-cla Bot added the CLA Signed label Jun 5, 2026
Emit Todo diagnostics for using and await using declarations instead of
silently treating them as ordinary const declarations.
Enable explicit resource management parsing in compiler test entrypoints
and add snap fixtures covering using and await using bailouts.
@magic-akari magic-akari force-pushed the fix/react-compiler-using branch from 2aae954 to 5aaa84a Compare June 5, 2026 03:35
@magic-akari magic-akari marked this pull request as ready for review June 5, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Compiler Bug]: using syntax is not preserved

1 participant