Skip to content

[compiler] Emit more specific error when making identifiers with reserved words #34080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2025

Conversation

poteto
Copy link
Member

@poteto poteto commented Aug 1, 2025

This currently throws an invariant which may be misleading. I checked the ecma262 spec and used the same list of reserved words in our check. To err on the side of being conservative, we also error when strict mode reserved words are used.

@meta-cla meta-cla bot added the CLA Signed label Aug 1, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Aug 1, 2025
@poteto poteto force-pushed the pr34080 branch 2 times, most recently from f92ebfd to 56e4e01 Compare August 1, 2025 16:52
…rved words

This currently throws an invariant which may be misleading. I checked the ecma262 spec and used the same list of reserved words in our check. To err on the side of being conservative, we also error when strict mode reserved words are used.
@poteto poteto merged commit 52612a7 into main Aug 1, 2025
22 checks passed
@poteto poteto deleted the pr34080 branch August 1, 2025 19:10
github-actions bot pushed a commit that referenced this pull request Aug 1, 2025
…rved words (#34080)

This currently throws an invariant which may be misleading. I checked
the ecma262 spec and used the same list of reserved words in our check.
To err on the side of being conservative, we also error when strict mode
reserved words are used.

DiffTrain build for [52612a7](52612a7)
github-actions bot pushed a commit that referenced this pull request Aug 1, 2025
…rved words (#34080)

This currently throws an invariant which may be misleading. I checked
the ecma262 spec and used the same list of reserved words in our check.
To err on the side of being conservative, we also error when strict mode
reserved words are used.

DiffTrain build for [52612a7](52612a7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants