Skip to content

[overlay] Fix Foundation extensions to Substring #12151

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
Sep 28, 2017

Conversation

moiseev
Copy link
Contributor

@moiseev moiseev commented Sep 27, 2017

When a substring gets bridged to NSString, it loses the initial offset,
therefore APIs that accept or return StringIndex ranges should handle
this case explicitly by adding/subtracting the substring start offset.

Fixes rdar://problem/33873277

@moiseev
Copy link
Contributor Author

moiseev commented Sep 27, 2017

@swift-ci Please test

@moiseev
Copy link
Contributor Author

moiseev commented Sep 28, 2017

/cc @phausler and @parkera

@phausler
Copy link
Contributor

We should also merge this back to swift-corelibs-foundation as well

@moiseev
Copy link
Contributor Author

moiseev commented Sep 28, 2017

@phausler I am going to do this once this gets merged.

When a substring gets bridged to NSString, it loses the initial offset,
therefore APIs that accept or return StringIndex ranges should handle
this case explicitly by adding/subtracting the substring start offset.

Fixes <rdar://problem/33873277>
@moiseev
Copy link
Contributor Author

moiseev commented Sep 28, 2017

@swift-ci Please test and merge

@swift-ci swift-ci merged commit 920e42f into swiftlang:master Sep 28, 2017
@moiseev moiseev deleted the ns-substring branch September 28, 2017 16:40
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