Skip to content

Ensure enum members syntactically determinable to be strings do not get reverse mappings#16602

Merged
JLHwung merged 2 commits intobabel:mainfrom
liuxingbaoyu:reverse-mappings-syntactically-determinable
Jul 22, 2024
Merged

Ensure enum members syntactically determinable to be strings do not get reverse mappings#16602
JLHwung merged 2 commits intobabel:mainfrom
liuxingbaoyu:reverse-mappings-syntactically-determinable

Conversation

@liuxingbaoyu
Copy link
Member

Q                       A
Fixed Issues? Ref: microsoft/TypeScript#57686
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

@liuxingbaoyu liuxingbaoyu added PR: Spec Compliance 👓 A type of pull request used for our changelog categories area: typescript labels Jul 2, 2024
@babel-bot
Copy link
Collaborator

babel-bot commented Jul 2, 2024

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/57236

@liuxingbaoyu liuxingbaoyu force-pushed the reverse-mappings-syntactically-determinable branch from 087567e to 91b4f09 Compare July 2, 2024 19:33
Comment on lines +130 to +133
expr.operator === "+" &&
(isSyntacticallyString(left as t.Expression) ||
isSyntacticallyString(right))
);
Copy link
Member

Choose a reason for hiding this comment

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

We have a test case that covers this branch, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we have a test that has a string on the left.

@JLHwung JLHwung merged commit ecc8e11 into babel:main Jul 22, 2024
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 22, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: typescript outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Spec Compliance 👓 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants