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-9973] NSNull should convert to any type of Optional as nil #3529

Open
swift-ci opened this issue Feb 22, 2019 · 1 comment
Open

[SR-9973] NSNull should convert to any type of Optional as nil #3529

swift-ci opened this issue Feb 22, 2019 · 1 comment

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-9973
Radar None
Original Reporter oscarmv (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: b0875dad2d4813f42fe005f6984c0d53

Issue Description:

It would be easier to write generic Swift logic that deals with Cocoa APIs (especially older ones) if NSNull would convert into any Optional (as nil, obviously).

Right now the runtime will blow up if it finds NSNull() as! Optional<any type whatsoever>.

@belkadan
Copy link

cc @jckarter

@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
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

2 participants