-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Implementation of the SE-130 proposal. #3758
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
@gribozavr Please review this implementation of the SE-130 proposal. |
@swift-ci Please test |
@@ -12,7 +12,8 @@ | |||
import TestsUtils | |||
|
|||
public func run_StringWithCString(_ N: Int) { | |||
let str = String(repeating: "x" as UnicodeScalar, count: 100 * (1 << 16)) | |||
let x = UnicodeScalar("x") | |||
let str = String(repeating: String(x), count: 100 * (1 << 16)) |
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.
Why not just:
let str = String(repeating: "x", count: 100 * (1 << 16))
@parkera This PR implements SE-130. Among other things, it removed |
Those look fine to me. |
It replaces String initializers taking Character or UnicodeScalar as a repeating value by a more general initializer that takes a String as a repeating value. This is done to avoid the ambiguities in the current String API, which can be only resolved by explicit casting. String.append(_:UnicodeScalar) APIs is also removed to match these changes.
5cde92d
to
a798852
Compare
@swift-ci Please some test Linux |
@swift-ci Please smoke test Linux |
@gribozavr Do you mind having a look at it? The biggest change is the fix for "appendToSubstringBug" test failure. |
It is impossible to test this PR and the related swiftlang/swift-package-manager#561 and swiftlang/swift-corelibs-foundation#477 using our CI. But I'm testing on a Linux box. |
OK. All tests on the Linux box seem to pass. I'm going to merge now. |
What's in this pull request?
Resolved bug number: (SR-1964)
rdar://problem/17028332
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.
It replaces String initializers taking Character or UnicodeScalar as a repeating value by a more general initializer that takes a String as a repeating value. This is done to avoid the ambiguities in the current String API, which can be only resolved by explicit casting.
String.append(_:UnicodeScalar) APIs is also removed to match these changes.