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-8244] String equal return different result if I changed the position of parameters #50776

Closed
swift-ci opened this issue Jul 13, 2018 · 5 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-8244
Radar None
Original Reporter kmk (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Swift 4.1

XCode Version 9.4.1 (9F2000)

Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug
Assignee kmk (JIRA)
Priority Medium

md5: 0c11ed739805f8bc3fcca4d1a45d4a64

Issue Description:

// String equal return different result if I changed the position of parameters

// I don't know if this is a bug ?

////////////////////////////////////////////////////////////

let u0 = "lǚ"

let u1 = "luǒ"

print(u0 == u1) // false

print(u1 == u0) // true

@belkadan
Copy link
Contributor

@milseman I think this was one of the things we and/or CoreFoundation fixed in Swift 4.2, right? At least, I don't see the bad behavior in the Xcode 10 beta.

@swift-ci
Copy link
Collaborator Author

Comment by kmk (JIRA)

Thank you.

@milseman
Copy link
Mannequin

milseman mannequin commented Jul 13, 2018

I don't know about CoreFoundation. For Swift 4.2, we switched off of CoreFoundation and onto our own custom comparison, which directly implements canonical equivalence. This issue does not reproduce for me with Swift 4.2

@milseman
Copy link
Mannequin

milseman mannequin commented Jul 13, 2018

Fixed in Swift 4.2

@milseman
Copy link
Mannequin

milseman mannequin commented Jul 13, 2018

kmk (JIRA User), can you verify your problem is fixed with a recent Xcode-10 beta and/or a recent 4.2 toolchain on swift.org?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

2 participants