Skip to content

Sema: Relax primary associated type matching in matchExistentialTypes() [6.1] #78631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

slavapestov
Copy link
Contributor

6.1 cherry-pick of #78559

  • Description: A fix for a soundness hole was too strict and broke source compatibility with existing valid code.

  • Origination: Regression first appeared in 6.1

  • Risk: Low.

  • Radar: rdar://141968103.

  • Reviewed by: @AnthonyLatsis and @xedin

Recently I found a soundness hole here, where we would allow conversion
between `any P<T>` and `any Q<T>` even if P and Q have different primary
associated types.

However, the fix was too strict, because we still want to allow the
conversion when the associated types have the same name.

Fixes rdar://141968103.
@slavapestov slavapestov requested a review from a team as a code owner January 14, 2025 15:58
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov merged commit 7b29c84 into swiftlang:release/6.1 Jan 15, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants