diff --git a/test/Constraints/opened_existentials.swift b/test/Constraints/opened_existentials.swift index a8519e23d4df8..ebbcae1227f10 100644 --- a/test/Constraints/opened_existentials.swift +++ b/test/Constraints/opened_existentials.swift @@ -565,3 +565,29 @@ do { types.assertTypesAreEqual() } } + +struct G: PP3 {} + +protocol PP1 { + associatedtype A +} + +extension PP1 { + func f(p: any PP2>) { + p.g(t: self) + } +} + +protocol PP2 { + associatedtype A + associatedtype B: PP3 where Self.B.A == Self.A +} + +extension PP2 { + func g(t: T) where Self.B == G {} +} + +protocol PP3 { + associatedtype A +} +