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-3825] CharacterSet union not working correctly on linux #4497

Closed
swift-ci opened this issue Feb 1, 2017 · 3 comments
Closed

[SR-3825] CharacterSet union not working correctly on linux #4497

swift-ci opened this issue Feb 1, 2017 · 3 comments

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Feb 1, 2017

Previous ID SR-3825
Radar None
Original Reporter tedgoddard (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

Linux Ubuntu 16.04, swift-3.1-DEVELOPMENT-SNAPSHOT-2017-01-31-a-ubuntu16.04

Additional Detail from JIRA
Votes 1
Component/s Foundation
Labels Bug, Linux
Assignee None
Priority Medium

md5: 558a338d055bf0172d7177fc7f763e73

duplicates:

  • SR-3688 String.rangeOfCharacter(from:) Produces Incorrect Result on Linux

Issue Description:

The following program prints "false" on ubuntu16.04 running in a docker image, but prints "true" on MacOS:

import Foundation
let separators = CharacterSet.punctuationCharacters.union(.whitespaces)
print(separators.contains(" "))

@swift-ci
Copy link
Contributor Author

swift-ci commented Apr 3, 2017

Comment by Ted Goddard (JIRA)

Tested on latest release and bug is still present:
Swift version 3.1 (swift-3.1-RELEASE)
Target: x86_64-unknown-linux-gnu

@swift-ci
Copy link
Contributor Author

Comment by Ryan Collins (JIRA)

Present on 4.0.3 as well

@spevans
Copy link
Collaborator

spevans commented Aug 27, 2018

Looks like this was fixed in 4.1

$ cat sr_3825.swift 
import Foundation
let separators = CharacterSet.punctuationCharacters.union(.whitespaces)
print(separators.contains(" "))

$ ~/swift-4.1-RELEASE-ubuntu16.04/usr/bin/swift sr_3825.swift 
true
 

@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
This issue was closed.
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