mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -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.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user