mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We can end up with a rule that has a protocol symbol on the right hand side:
X.Y.Z => X.W.[P]
This will occur if X.W.[P] was obtained by simplifying a term X.W.U.V via
a rule (U.V => [P]), and before completion discovers a rule
(X.W.[P] => X.W).
Fixes rdar://problem/94854326, rdar://problem/94980084.
20 lines
392 B
Swift
20 lines
392 B
Swift
// RUN: %target-swift-frontend -typecheck %s -debug-generic-signatures 2>&1 | %FileCheck %s
|
|
|
|
protocol P1 {
|
|
associatedtype T: P2 where T.T == Self
|
|
}
|
|
|
|
protocol P2 {
|
|
associatedtype T
|
|
}
|
|
|
|
protocol P3: P2 {}
|
|
|
|
protocol P4 {
|
|
associatedtype T
|
|
}
|
|
|
|
// CHECK-LABEL: .G@
|
|
// CHECK-NEXT: Generic signature: <T where T : P4, T.[P4]T : P1, T.[P4]T.[P1]T : P3>
|
|
class G<T: P4> where T.T: P1, T.T.T: P3 {}
|