-
Notifications
You must be signed in to change notification settings - Fork 1.2k
SR-7017: JSONDecoder will decode booleans as numbers. #1442
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
Conversation
- If an NSNumber was initialised from a boolean then dont allow it to be converted to a numeric value.
|
@swift-ci please test |
|
@swift-ci please test |
itaiferber
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together! The approach is sound, but do you think we'd be able to get the source changes here closer to what was done in swiftlang/swift#11885? The less our implementations and tests diverge between the overlay and swift-corelibs-foundation, the easier it'll be to to apply similar changes between them.
|
@itaiferber Ive updated it to match the overlay. |
|
@swift-ci please test |
3 similar comments
|
@swift-ci please test |
|
@swift-ci please test |
|
@swift-ci please test |
|
@itaiferber can you re-review the changes after Simon added the subsequent commit? It looks like the tests pass now. |
|
@alblue Yes, sorry — this fell off my Radar. |
|
@swift-ci please test and merge |
to be converted to a numeric value.
Tested against native Darwin Foundation.