[6.0] Make SwiftValue == support unconditional #73604
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description: 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. However, it appears the only such problems arose from the SwiftObject behavior changes, not from SwiftValue behavior. So let's optimistically make the new SwiftValue behavior unconditional and simplify future maintenance. (This leaves the SwiftObject behavior conditional, as we know there is old code that inadvertently relied on the old behavior.)
Scope/Impact: Changes how certain Swift values appear when bridged to Objective-C. This only affects non-class types that implement Equatable but do not implement Hashable.
Risk: Medium. Although we don't know of any, it's possible some existing/legacy code is relying on the old behavior. In that case, we would have to restore the conditional logic here.
Testing: Unit tests updated to uniformly verify the new behavior.
Reviewed By: @mikeash
Radar: rdar://127839540