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-1882] String Interpolation of Optionals #44491

Closed
swift-ci opened this issue Jun 23, 2016 · 1 comment
Closed

[SR-1882] String Interpolation of Optionals #44491

swift-ci opened this issue Jun 23, 2016 · 1 comment
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-1882
Radar None
Original Reporter charlieMonroe (JIRA User)
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @CodaFi
Priority Medium

md5: e1503011ac1e37a08f927145f540894c

Issue Description:

As per discussion on Swift evolution (http://thread.gmane.org/gmane.comp.lang.swift.evolution/17575), Chris Lattner suggested it doesn't need to go through Swift evolution.

Interpolation of an Optional should create a warning and offer two fix-it suggestions (http://article.gmane.org/gmane.comp.lang.swift.evolution/20960):

a) Add redundant parentheses around the expression to silence the warning,
b) Add " ?? <#placeholder#>" for adding a default value.

I've originally thought I'd have a whack at it, but I won't have time until mid July to look around the compiler code, so I'm filing this as a bug report if anyone can get to it faster.

@CodaFi
Copy link
Member

CodaFi commented Oct 6, 2016

Resolved by the merge of #5110

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants