Skip to content
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

Fix scala-js#4088: Avoid an Int overflow in BigDecimal.toString(). #1837

Conversation

LeeTibbert
Copy link
Contributor

  • 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:

  • The standard changelog entry is requested.

Testing:

Safety:

  • Built and tested ("test-all") in debug mode using sbt 1.3.13 on
    X86_64 only . All tests pass.

Efficacy:

  • The test suite ported from Scala.js failed before this PR and now
    passes.

  * This PR was motivated by Scala.js Issue #4088
    "BigDecimal(1, -2147483648).toString returns "1E-2147483648""

    The Scala.js 1.1.1 [Release Announcement](
    https://www.scala-js.org/news/2020/07/02/announcing-scalajs-1.1.1/)
    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:

  * The standard changelog entry is requested.

Testing:

  Safety:

  * Built and tested ("test-all") in debug mode using sbt 1.3.13 on
    X86_64 only . All tests pass.

  Efficacy:

  * The test suite ported from Scala.js failed before this PR and now
    passes.
@sjrd sjrd merged commit d83fad4 into scala-native:master Jul 6, 2020
1 check passed
ekrich pushed a commit to ekrich/scala-native that referenced this pull request May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants