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

[SR-8534] Crash with NSNumber.init + TimeInterval #3647

Closed
swift-ci opened this issue Aug 14, 2018 · 0 comments
Closed

[SR-8534] Crash with NSNumber.init + TimeInterval #3647

swift-ci opened this issue Aug 14, 2018 · 0 comments

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-8534
Radar None
Original Reporter rounak (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Environment

Xcode 10 beta 6

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: 4103eb128b67ba9ff4c58389d7eceaa5

duplicates:

  • SR-8516 NSNumber.init returns instance of NSConcreteValue

Issue Description:

The following lines of code crashes on Xcode 10, but not on Xcode 9

import Foundation
let numbers = [TimeInterval(1), 2].map(NSNumber.init)
print(numbers[0].doubleValue)

Making this change (inside the array) fixes it

import Foundation let numbers = [TimeInterval(1), TimeInterval(2)].map(NSNumber.init) 
print(numbers[0].doubleValue)
@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant