Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions test/Constraints/opened_existentials.swift
Original file line number Diff line number Diff line change
Expand Up @@ -565,3 +565,29 @@ do {
types.assertTypesAreEqual()
}
}

struct G<A>: PP3 {}

protocol PP1 {
associatedtype A
}

extension PP1 {
func f(p: any PP2<G<Self.A>>) {
p.g(t: self)
}
}

protocol PP2<B> {
associatedtype A
associatedtype B: PP3 where Self.B.A == Self.A
}

extension PP2 {
func g<T: PP1>(t: T) where Self.B == G<T.A> {}
}

protocol PP3 {
associatedtype A
}