Fix scala-js#4088: Avoid an Int overflow in BigDecimal.toString(). #1837
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
This PR was motivated by Scala.js Issue #4088
"BigDecimal(1, -2147483648).toString returns "1E-2147483648""
The Scala.js 1.1.1 Release Announcement
described that issue as having been fixed.
Scala Native Conversion.scala is derived from Scala.js and
had the same bug. The same fix was relevant and applied neatly.
The presenting issue is now fixed.
The test suite from the Scala.js fix was ported to Scala Native.
The Scala Native instance of Conversions.scala had diverged from
its Scala.js progenitor. Only the changes for the presenting
problem were ported.
Documentation:
Testing:
Safety:
X86_64 only . All tests pass.
Efficacy:
passes.