Skip to content

JSONDecoder: Check that a parsed float does not return infinity. #2989

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
Mar 9, 2021

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Mar 8, 2021

- The behaviour of the floating point string parsing for Float and
  Double was changed to return +/-infinity instead of nil on overflow.
  (swiftlang/swift#34339)

- Add an isFinite check to ensure that the result of a floating point
  conversion still fits in the type, matching current behaviour.
@spevans
Copy link
Contributor Author

spevans commented Mar 8, 2021

@swift-ci test

@spevans
Copy link
Contributor Author

spevans commented Mar 8, 2021

cc @fabianfett

@spevans
Copy link
Contributor Author

spevans commented Mar 9, 2021

@swift-ci test linux

1 similar comment
@spevans
Copy link
Contributor Author

spevans commented Mar 9, 2021

@swift-ci test linux

@spevans spevans merged commit 2232811 into swiftlang:main Mar 9, 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.

2 participants