Skip to content

SR-3126: Decimal(Double.infinity) hangs forever #1567

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

Merged
merged 1 commit into from
May 30, 2018

Conversation

spevans
Copy link
Contributor

@spevans spevans commented May 29, 2018

  • Decimal doesnt fully support floating point so trap when initialised
    with Double.infinity.

  • Also mark Decimal properties .infinity and .signalingNaN and
    formTruncatingRemainder(dividingBy:) as unavailable.

Decimal.swift requires a big sync-up with swift/stdlib/public/SDK/Foundation/Decimal.swift at some point, but this prevents an infinite-loop and provides a useful error message.

- Decimal doesnt fully support floating point so trap when initialised
  with Double.infinity.

- Also mark Decimal properties .infinity and .signalingNaN and
 formTruncatingRemainder(dividingBy:) as unavailable.
@spevans
Copy link
Contributor Author

spevans commented May 29, 2018

@swift-ci please test

@millenomi millenomi merged commit 40cb3e0 into swiftlang:master May 30, 2018
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.

2 participants