mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Make SwiftValue == support unconditional
PR #71620 made this behavior conditional as a way to help provide binary compatibility for legacy software that might be relying on the old behavior. So far, it appears the only such problems arose from the SwiftObject behavior changes, not from SwiftValue behavior. So let's optimistically back this out and make the new behavior unconditional. Resolves rdar://127839540
This commit is contained in:
@@ -430,10 +430,10 @@ swift::findSwiftValueConformances(const ExistentialTypeMetadata *existentialType
|
||||
}
|
||||
}
|
||||
|
||||
if (runtime::bincompat::useLegacySwiftObjCHashing()) {
|
||||
// Legacy behavior only proxies isEqual: for Hashable, not Equatable
|
||||
return NO;
|
||||
}
|
||||
// if (runtime::bincompat::useLegacySwiftObjCHashing()) {
|
||||
// // Legacy behavior only proxies isEqual: for Hashable, not Equatable
|
||||
// return NO;
|
||||
// }
|
||||
|
||||
if (auto equatableConformance = selfHeader->getEquatableConformance()) {
|
||||
if (auto selfEquatableBaseType = selfHeader->getEquatableBaseType()) {
|
||||
@@ -464,10 +464,10 @@ swift::findSwiftValueConformances(const ExistentialTypeMetadata *existentialType
|
||||
selfHeader->type, hashableConformance);
|
||||
}
|
||||
|
||||
if (runtime::bincompat::useLegacySwiftObjCHashing()) {
|
||||
// Legacy behavior doesn't honor Equatable conformance, only Hashable
|
||||
return (NSUInteger)self;
|
||||
}
|
||||
// if (runtime::bincompat::useLegacySwiftObjCHashing()) {
|
||||
// // Legacy behavior doesn't honor Equatable conformance, only Hashable
|
||||
// return (NSUInteger)self;
|
||||
// }
|
||||
|
||||
// If Swift type is Equatable but not Hashable,
|
||||
// we have to return something here that is compatible
|
||||
|
||||
Reference in New Issue
Block a user