Commit Graph

2 Commits

Author SHA1 Message Date
Slava Pestov
c257cdbc7c Sema: Relax primary associated type matching in matchExistentialTypes()
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.
2025-01-10 15:37:10 -05:00
Slava Pestov
8beaa7b231 Sema: Fix matchExistentialType() handling of ProtocolCompositionType containing ParameterizedProtocolType
This fixes a soundness hole. We can't just match up the primary
associated types of different protocols.
2024-10-22 20:14:44 -04:00