Skip to content

Commit 9ace644

Browse files
authored
Merge pull request #81476 from slavapestov/test-rdar148357926
Add regression test for rdar://148357926
2 parents 3a2beae + 373d08e commit 9ace644

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/Constraints/opened_existentials.swift

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,3 +565,29 @@ do {
565565
types.assertTypesAreEqual()
566566
}
567567
}
568+
569+
struct G<A>: PP3 {}
570+
571+
protocol PP1 {
572+
associatedtype A
573+
}
574+
575+
extension PP1 {
576+
func f(p: any PP2<G<Self.A>>) {
577+
p.g(t: self)
578+
}
579+
}
580+
581+
protocol PP2<B> {
582+
associatedtype A
583+
associatedtype B: PP3 where Self.B.A == Self.A
584+
}
585+
586+
extension PP2 {
587+
func g<T: PP1>(t: T) where Self.B == G<T.A> {}
588+
}
589+
590+
protocol PP3 {
591+
associatedtype A
592+
}
593+

0 commit comments

Comments
 (0)