[CS] Use simplifyType in isDependentMemberTypeWithBaseThatContainsUnresolvedPackExpansions

The pack expansion type variable may be a nested in the fixed type of
another type variable, and as such we unfortunately need to fully
`simplifyType` here.

rdar://162545380
This commit is contained in:
Hamish Knight
2025-10-14 14:49:37 +01:00
parent 7fe655de7b
commit 1f5a0b4c88
2 changed files with 25 additions and 2 deletions

View File

@@ -833,3 +833,23 @@ func test_dependent_members() {
return Variadic.f(c1, c2) // Ok
}
}
protocol P2 {
associatedtype X
}
extension P2 {
func foo() where X == Bool {}
func foo() where X == String {}
}
do {
struct S<each E>: P2 {
typealias X = String
init(_ fn: () -> (repeat each E)) {}
}
func foo(_ x: Int) {
S { x }.foo() // Make sure we can pick the right 'foo' here.
}
}