mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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.
12 lines
418 B
Swift
12 lines
418 B
Swift
// RUN: %target-swift-frontend -typecheck %s -debug-generic-signatures 2>&1 | %FileCheck %s
|
|
|
|
struct G<Value> {}
|
|
|
|
protocol P {
|
|
associatedtype T
|
|
}
|
|
|
|
// CHECK-LABEL: ExtensionDecl line={{.*}} base=G
|
|
// CHECK-NEXT: <Value where Value : P, Value.[P]T : CaseIterable, Value.[P]T.[CaseIterable]AllCases : RandomAccessCollection>
|
|
extension G where Value: P, Value.T: CaseIterable, Value.T.AllCases: RandomAccessCollection {}
|