-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Large numeric literals are emitted as Infinity
/ -Infinity
instead of remaining as they are.
#9223
Labels
Milestone
Comments
Guide for GFIThe problematic logic is swc/crates/swc_ecma_codegen/src/lib.rs Lines 705 to 713 in 260f806
We can move code for using |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Roundtripping an AST containing the code below, the output contains
-Infinity
instead of-1e999
. I think the output should remain as-1e999
.Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.6.7&code=H4sIAAAAAAAAA0vOzysuUahQsFXQNUy1tLS0BgAenTgBEQAAAA%3D%3D&config=H4sIAAAAAAAAA21QOw7CMAzde4rKMwPqwMAdmDiBFVwU1HxkOxJV1buTtA0tEksUv4%2Bf7alpW3iJgWs75W8uIrIQf%2BuMyOgV3xkBHSOJYRsVTpVVKVSPg9ACzSsDivwkLS6S7tx1mwOGEISqY8Oc9bYfj5kmuMgk8issUvTPgf4nMnrpA7tjIyY0egAyZF0MrPeQ2JRG4KO7rrLTLuLk1bqFx6TBoVoDGz039V2iwYVHWmbaTljOtC5%2BgV1Ud%2FzuA1Zu1amcqJk%2FtsEHsI4BAAA%3D
SWC Info output
No response
Expected behavior
Actual behavior
Version
1.6.7
Additional context
No response
The text was updated successfully, but these errors were encountered: