Skip to content

SR-5727: Sync NSStringAPI.swift from overlay #1178

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

Merged
merged 1 commit into from
Aug 29, 2017

Conversation

ianpartridge
Copy link
Contributor

Over time, NSStringAPI.swift has diverged from the version in the overlay.

This PR brings them back into sync, by copying the overlay version into swift-corelibs-foundation, then fixing the resulting breakages so it builds and passes TestFoundation on Linux and in Xcode.

Hopefully this will make it easier to port changes between the two in future.

This is a second attempt after #1167

@ianpartridge
Copy link
Contributor Author

@swift-ci please test

@ianpartridge
Copy link
Contributor Author

@phausler @parkera are you happy with this? It fixes bad things like this:

Linux:

$ swift
Welcome to Swift version 4.0-dev (LLVM 2dedb62a0b, Clang b9d76a314c, Swift 61ad3c07ef). Type :help for assistance.
  1> import Foundation 
  2. let str = "abc" 
  3. str[str.startIndex...].replacingOccurrences(of: "a", with: "A")
error: repl.swift:3:4: error: value of type 'String.SubSequence' (aka 'Substring') has no member 'replacingOccurrences'
str[str.startIndex...].replacingOccurrences(of: "a", with: "A")
~~~^~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~

Darwin:

$ swift
Welcome to Apple Swift version 4.0-dev (LLVM 2dedb62a0b, Clang b9d76a314c, Swift 61ad3c07ef). Type :help for assistance.
  1> import Foundation 
  2. let str = "abc" 
  3. str[str.startIndex...].replacingOccurrences(of: "a", with: "A") 
$R0: String = "Abc"
str: String = "abc"

@ianpartridge ianpartridge changed the title Sync NSStringAPI.swift from overlay SR-5727: Sync NSStringAPI.swift from overlay Aug 22, 2017
@ianpartridge
Copy link
Contributor Author

@parkera Thanks for merging swiftlang/swift#11474 - can we do this one too?

@parkera
Copy link
Contributor

parkera commented Aug 29, 2017

@swift-ci test and merge

@swift-ci swift-ci merged commit 5d6e95f into swiftlang:master Aug 29, 2017
@ianpartridge ianpartridge deleted the nsstringapi branch September 12, 2017 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants