Skip to content

[Foundation] Ensure _SwiftNSCharacterSet overrides all abstract metho… #4168

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 17, 2016

Conversation

phausler
Copy link
Contributor

@phausler phausler commented Aug 9, 2016

What's in this pull request?

The override methods were not marked with @objc which incorrectly funneled to the abstract base class methods. In the method isSuperset(of:) it would incorrectly hit a requirement of a subclass implementation. This exposed a flaw with NSCharacterSet in which that method cannot recieve subclasses to the other CharacterSet being passed. This is being tracked via rdar://problem/27768939 which will need to be accounted for by CoreFoundation. Until such a time that can be addressed the workaround by using CFCharacterSetIsSupersetOfSet must be used with a copy passed as the other set.

This is a cherry pick of the fix applied to the swift 3.0 branch in #4162

Resolved bug number: (SR-2307)


…ds on NSCharacterSet via @objc

The override methods were not marked with @objc which incorrectly funneled to the abstract base class methods. In the method isSuperset(of:) it would incorrectly hit a requirement of a subclass implementation. This exposed a flaw with NSCharacterSet in which that method cannot recieve subclasses to the other CharacterSet being passed. This is being tracked via rdar://problem/27768939 which will need to be accounted for by CoreFoundation. Until such a time that can be addressed the workaround by using CFCharacterSetIsSupersetOfSet must be used with a copy passed as the other set.

This resolves:
https://bugs.swift.org/browse/SR-2307
@tkremenek
Copy link
Member

@swift-ci smoke test os x

@tkremenek
Copy link
Member

@swift-ci test

@tkremenek tkremenek self-assigned this Aug 17, 2016
@tkremenek tkremenek merged commit e706666 into swiftlang:master Aug 17, 2016
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.

2 participants