-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib][SE-0089] Finish off Lossless String Conversion #3761
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
Conversation
extension UnicodeScalar : LosslessStringConvertible { | ||
public init?(_ description: String) { | ||
_precondition(description.unicodeScalars.count == 1) | ||
if let v = description.unicodeScalars.first { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels too clever.
3b38691
to
5eeddf5
Compare
@swift-ci please test. |
@gribozavr @dabrahams Mind a quick review? |
@@ -355,7 +355,7 @@ public struct Character : | |||
|
|||
extension Character : CustomStringConvertible { | |||
public var description: String { | |||
return String(self) | |||
return String(describing: self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method should not go through reflection either, there are better, more performant ways to do this. (And wouldn't it call itself in fact?)
Reviewed. |
5629b9a
to
db8be58
Compare
@swift-ci please smoke test. |
Patches are lined up for the other repos and tested locally - this should be ready for manual merge after we sort the bots. |
@tkremenek Would you mind simultaneously merging this with swiftlang/swift-package-manager#567 |
@CodaFi I merged more tests to |
db8be58
to
7c2b328
Compare
Thanks for letting me know, testing now. |
7c2b328
to
ec9998f
Compare
@swift-ci smoke test |
@tkremenek Ready to merge. |
@swift-ci Please test |
@CodaFi Seems like we need fixes for the playgrounds repo:
|
And Foundation, too:
|
We are seeing following test failures in CI (Ubuntu 15.10), after merging this PR.
|
So so sorry. Patch incoming. |
What's in this pull request?
While Max is away, this patch finishes up his work on SE-0089.
Resolved bug number: (SR-1881)
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
A smoke test on macOS does the following:
device standard libraries are not built.
version of these tests are not run.
A smoke test on Linux does the following:
tests are not run.
Validation Testing
Lint Testing
Note: Only members of the Apple organization can trigger swift-ci.