Skip to content
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

[SR-3311] CharacterSet empty set behaves incorrectly in isSubset() and isSuperset() and maybe others #3910

Open
gparker42 mannequin opened this issue Dec 2, 2016 · 2 comments

Comments

@gparker42
Copy link
Mannequin

gparker42 mannequin commented Dec 2, 2016

Previous ID SR-3311
Radar None
Original Reporter @gparker42
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: 5652e1e44878bec36b9837535a709276

Issue Description:

CharacterSet mis-handles the empty set in isSubset() and isSuperset() and maybe others.

PR #6000 tried to fix isSubset() and isSuperset() but ran into a bug, probably some other previously-existing bug (rdar://29474937). This bug report covers (1) re-fixing isSubset() and isSuperset() and (2) checking for other incorrect empty set behavior in the CharacterSet implementation.

@belkadan
Copy link

belkadan commented Dec 9, 2016

@phausler, there are quite a few CharacterSet bugs on JIRA by now. Is there a plan here?

@phausler
Copy link
Member

phausler commented Dec 9, 2016

Tony is currently working on a set of fixes for this; the problem is that NSCharacterSet is not really meant to be subclassed and the swift implementation of CharacterSet requires that. The problem isn't really from isSubset or isSuperset it is the backing of CFCharacterSet specifically has a set of issues for subclasses when they are created via strings. My guess is that most of these issues will be addressed by the refactor and we can also address the internal issues to CoreFoundation when appropriate.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants