Skip to content

Commit 94796e0

Browse files
committed
Add regression test to close #52588
1 parent f03274b commit 94796e0

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/decl/protocol/req/associated_type_inference.swift

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,27 @@ struct S40<E: Equatable>: P40c {
684684
typealias B = Self
685685
}
686686

687+
protocol P41a {
688+
associatedtype A
689+
associatedtype B
690+
691+
func bar(_: B) -> A?
692+
}
693+
protocol P42b: P41a {
694+
associatedtype A
695+
associatedtype B
696+
697+
func foo(_: A, _: B)
698+
}
699+
extension P42b {
700+
func bar(_: B) -> A? {}
701+
}
702+
do {
703+
class Conformer: P42b {
704+
func foo(_: Bool, _: String) {}
705+
}
706+
}
707+
687708
// Fails to find the fixed type witness B == FIXME_S1<A>.
688709
protocol FIXME_P1a {
689710
associatedtype A: Equatable = Never // expected-note {{protocol requires nested type 'A'}}

0 commit comments

Comments
 (0)