Skip to content

Commit cb03a45

Browse files
committed
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
1 parent b421b1a commit cb03a45

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

stdlib/public/runtime/SwiftValue.mm

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,10 @@ - (BOOL)isEqual:(id)other {
430430
}
431431
}
432432

433-
if (runtime::bincompat::useLegacySwiftObjCHashing()) {
434-
// Legacy behavior only proxies isEqual: for Hashable, not Equatable
435-
return NO;
436-
}
433+
// if (runtime::bincompat::useLegacySwiftObjCHashing()) {
434+
// // Legacy behavior only proxies isEqual: for Hashable, not Equatable
435+
// return NO;
436+
// }
437437

438438
if (auto equatableConformance = selfHeader->getEquatableConformance()) {
439439
if (auto selfEquatableBaseType = selfHeader->getEquatableBaseType()) {
@@ -464,10 +464,10 @@ - (NSUInteger)hash {
464464
selfHeader->type, hashableConformance);
465465
}
466466

467-
if (runtime::bincompat::useLegacySwiftObjCHashing()) {
468-
// Legacy behavior doesn't honor Equatable conformance, only Hashable
469-
return (NSUInteger)self;
470-
}
467+
// if (runtime::bincompat::useLegacySwiftObjCHashing()) {
468+
// // Legacy behavior doesn't honor Equatable conformance, only Hashable
469+
// return (NSUInteger)self;
470+
// }
471471

472472
// If Swift type is Equatable but not Hashable,
473473
// we have to return something here that is compatible

0 commit comments

Comments
 (0)