Avatar
Avatar
koher
@swift-5.8.1 import Foundation struct Foo<T: Equatable> { func bar(_ x: T, _ y: T) -> Bool { x == y } } let a: NSMutableString = "X" let b: NSMutableString = "X" print(a === b) print(Foo<NSObject>().bar(a, b)) print(Foo<NSString>().bar(a, b)) print(Foo<NSMutableString>().bar(a, b))
false true true true