Commit c257cdb
committed
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.1 parent c170443 commit c257cdb
2 files changed
+25
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4221 | 4221 | | |
4222 | 4222 | | |
4223 | 4223 | | |
4224 | | - | |
| 4224 | + | |
4225 | 4225 | | |
4226 | 4226 | | |
4227 | 4227 | | |
| |||
4232 | 4232 | | |
4233 | 4233 | | |
4234 | 4234 | | |
4235 | | - | |
4236 | | - | |
| 4235 | + | |
4237 | 4236 | | |
4238 | 4237 | | |
4239 | 4238 | | |
| |||
4248 | 4247 | | |
4249 | 4248 | | |
4250 | 4249 | | |
4251 | | - | |
4252 | 4250 | | |
4253 | 4251 | | |
4254 | | - | |
| 4252 | + | |
4255 | 4253 | | |
4256 | 4254 | | |
4257 | 4255 | | |
| |||
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
0 commit comments