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-4903] Comparing NSArray for equality is broken on Linux when NSArray contains _ObjectBridgeable #3859

Closed
norio-nomura opened this issue May 16, 2017 · 3 comments

Comments

@norio-nomura
Copy link
Contributor

Previous ID SR-4903
Radar None
Original Reporter @norio-nomura
Type Bug
Status Resolved
Resolution Done
Environment

Swift 3.0.2, 3.1, 3.1.1
swift-4.0-DEVELOPMENT-SNAPSHOT-2017-05-15-a

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

md5: a72af3d8529af5d3a9ef5aaacab734a7

Issue Description:

Expected result on macOS:

$ swift
swift_oss_helper command enabled.
Welcome to Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42). Type :help for assistance.
  1> import Foundation
  2> NSArray(array: [["key": 0]]) == NSArray(array: [["key": 1]])
$R0: Bool = false
  3> ^D

broken result on Linux:

$ docker run --privileged -it -v `pwd`:`pwd` -w `pwd` --rm norionomura/swift:4020170515a swift -I /usr/lib/swift/clang/include
Welcome to Swift version 4.0-dev (LLVM f175cad503, Clang 51f7aba0dc, Swift 79b6334dd8). Type :help for assistance.
  1> import Foundation
  2> NSArray(array: [["key": 0]]) == NSArray(array: [["key": 1]])
$R0: Bool = true
  3> ^D

As far as I tested on jpsim/SourceKitten#384 it is broken since Swift 3.0.2 at least.

@norio-nomura
Copy link
Contributor Author

opened #990

@norio-nomura
Copy link
Contributor Author

opened for Swift 3.1 #1002

@spevans
Copy link
Collaborator

spevans commented Aug 31, 2018

This was fixed in 4.0

$ cat sr_4903.swift 
import Foundation

let x = NSArray(array: [["key": 0]]) == NSArray(array: [["key": 1]])
print(x)

$ ~/swift-4.0-RELEASE-ubuntu16.04/usr/bin/swift sr_4903.swift 
false

@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