Skip to content

Commit 6c32830

Browse files
committed
1 parent 06dabe9 commit 6c32830

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

test/Generics/sr15826.swift

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// RUN: %target-swift-frontend -typecheck %s -debug-generic-signatures -requirement-machine-inferred-signatures=on 2>&1 | %FileCheck %s
2+
3+
protocol AProtocol {
4+
associatedtype B: BProtocol where B.A == Self
5+
}
6+
7+
protocol BProtocol {
8+
associatedtype A: AProtocol
9+
}
10+
11+
protocol CProtocol {
12+
associatedtype A: AProtocol
13+
}
14+
15+
protocol DProtocol {
16+
associatedtype A: AProtocol
17+
18+
// CHECK-LABEL: .DProtocol.foo(c:)@
19+
// CHECK-NEXT: <Self, C where Self : DProtocol, C : CProtocol, Self.[DProtocol]A == C.[CProtocol]A>
20+
func foo<C: CProtocol>(c: C) where C.A == A
21+
}
22+
23+
struct Foo<Value> {
24+
// CHECK-LABEL: .Foo.bar(c:)@
25+
// CHECK-NEXT: <Value, C where Value == C.[CProtocol]A, C : CProtocol>
26+
func bar<C: CProtocol>(c: C) where C.A == Value {}
27+
}

0 commit comments

Comments
 (0)