From 373d08e572528db4ff9312ad26b6e220dade7f62 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 13 May 2025 11:16:39 -0400 Subject: [PATCH] Add regression test for rdar://148357926 I believe this was fixed by https://github.com/swiftlang/swift/pull/81181. --- test/Constraints/opened_existentials.swift | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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 +} +