Navigation Menu

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-2257] Missing String.init(_:) for StaticString #44864

Open
natecook1000 opened this issue Aug 2, 2016 · 6 comments
Open

[SR-2257] Missing String.init(_:) for StaticString #44864

natecook1000 opened this issue Aug 2, 2016 · 6 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella

Comments

@natecook1000
Copy link
Member

Previous ID SR-2257
Radar None
Original Reporter @natecook1000
Type Bug
Environment

Swift 3, Swift 4

Additional Detail from JIRA
Votes 5
Component/s Standard Library
Labels Bug
Assignee None
Priority Medium

md5: 1eefb7de0339506ae1b3324532e546b7

Issue Description:

Creating a String from a StaticString is a full-width initialization—there should be a String.init(_: StaticString) initializer so one doesn't need to fall back to String.init(describing:).

@belkadan
Copy link
Contributor

belkadan commented Aug 2, 2016

cc @dabrahams

@natecook1000
Copy link
Member Author

Note: This has sort of already been approved in SE-0089, since StaticString is one of the types listed under LosslessStringConvertible. As far as I can tell, however, StaticString can't actually conform to LosslessStringConvertible, since it's... static.

@CodaFi
Copy link
Member

CodaFi commented Aug 8, 2016

You're right about why we can't go through a `LosslessStringConvertible` conformance - the proposal should be amended to remove that from the list.

@belkadan
Copy link
Contributor

@milseman: starter bug? Wouldn't need to go through -evolution, right?

@milseman
Copy link
Mannequin

milseman mannequin commented Nov 16, 2017

Look like a good starter bug. Not sure about needing swift-evo. @airspeedswift?

@swift-ci
Copy link
Collaborator

Comment by Mario Schreiner (JIRA)

#21572

First contribution to a project this size, so any tips/hints for improving are welcome 🙂

@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
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

4 participants