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-11071] bad diagnostic with map on Optional #53463

Open
mattneub opened this issue Jul 5, 2019 · 2 comments
Open

[SR-11071] bad diagnostic with map on Optional #53463

mattneub opened this issue Jul 5, 2019 · 2 comments
Labels
compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation improvement

Comments

@mattneub
Copy link

mattneub commented Jul 5, 2019

Previous ID SR-11071
Radar None
Original Reporter @mattneub
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, DiagnosticsQoI
Assignee None
Priority Medium

md5: dbcf9f771847a26775cdd147d3988c05

Issue Description:

@belkadan
Copy link
Contributor

belkadan commented Jul 5, 2019

Optional has a map method. The compiler's not really wrong here. cc @xedin

@mattneub
Copy link
Author

mattneub commented Jul 5, 2019

That's obviously a really good point. So the stuff I said about "odd" is wrong. But can we do anything here to help the user out? Maybe the compiler could ask itself what would have happened if the Optional had been unwrapped?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation improvement
Projects
None yet
Development

No branches or pull requests

2 participants