-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
SDKOverlaybugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.standard libraryArea: Standard library umbrellaArea: Standard library umbrella
Description
| Previous ID | SR-3172 |
| Radar | rdar://problem/29026017 |
| Original Reporter | @ChristopherRogers |
| Type | Bug |
| Status | Closed |
| Resolution | Done |
Environment
Xcode 8.1, Swift 3.0.1
Xcode 8.1, Development Snapshot 2016-11-09
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Standard Library |
| Labels | Bug, SDKOverlay |
| Assignee | None |
| Priority | Medium |
md5: 7c87927e15a61fb97e3113802a6eade2
Issue Description:
All of these statements except the last evaluate to true. I believe it should be true as well. This affects Swift to Objective-C bridging where the Objective-C code isn't using lightweight generics.
([42] as Array as NSArray).contains(42)
([42] as Array as NSArray).contains(NSNumber(value: 42))
([42] as Array<AnyHashable> as NSArray).contains(42)
([42] as Array<AnyHashable> as NSArray).contains(NSNumber(value: 42))
([42] as Set as NSSet).contains(42)
([42] as Set as NSSet).contains(NSNumber(value: 42))
([42] as Set<AnyHashable> as NSSet).contains(42)
([42] as Set<AnyHashable> as NSSet).contains(NSNumber(value: 42)) // falseMetadata
Metadata
Assignees
Labels
SDKOverlaybugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.standard libraryArea: Standard library umbrellaArea: Standard library umbrella