Skip to content

Commit

Permalink
fix(es/codegen): Fix codegen of large numeric literals (#9226)
Browse files Browse the repository at this point in the history
**Description:**

This PR moves the infinite check below the raw number check.


**Related issue:**

 - Closes #9223
  • Loading branch information
imranbarbhuiya authored Jul 15, 2024
1 parent 8c42031 commit fba79e6
Show file tree
Hide file tree
Showing 20 changed files with 56 additions and 25 deletions.
19 changes: 19 additions & 0 deletions crates/swc/tests/fixture/issues-9xxx/9223/input/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": false
},
"target": "es2022",
"loose": false,
"minify": {
"compress": false,
"mangle": false
}
},
"module": {
"type": "es6"
},
"minify": false,
"isModule": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const x = -1e999;
const y = 1e999;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const x = -1e999;
const y = 1e999;

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fba79e6

Please sign in to comment.