Skip to content

Commit 478d04b

Browse files
committed
RequirementMachine: Add passing testcase for rdar://78233378
1 parent d5bae15 commit 478d04b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

test/Generics/rdar78233378.swift

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// RUN: %target-swift-frontend -typecheck %s -debug-generic-signatures -requirement-machine-protocol-signatures=on 2>&1 | %FileCheck %s
2+
3+
// CHECK-LABEL: rdar78233378.(file).P1@
4+
// CHECK-LABEL: Requirement signature: <Self where Self : P4, Self == Self.T1.T2, Self.T1 : P2>
5+
public protocol P1: P4 where T1.T2 == Self {
6+
associatedtype T1: P2
7+
}
8+
9+
// CHECK-LABEL: rdar78233378.(file).P2@
10+
// CHECK-LABEL: Requirement signature: <Self where Self : P5, Self.T2 : P1>
11+
public protocol P2: P5 where T2: P1 {}
12+
13+
// CHECK-LABEL: rdar78233378.(file).P3@
14+
// CHECK-LABEL: Requirement signature: <Self where Self.T2 : P4>
15+
public protocol P3 {
16+
associatedtype T2: P4
17+
}
18+
19+
// CHECK-LABEL: rdar78233378.(file).P4@
20+
// CHECK-LABEL: Requirement signature: <Self where Self == Self.T3.T2, Self.T3 : P3>
21+
public protocol P4 where T3.T2 == Self {
22+
associatedtype T3: P3
23+
}
24+
25+
// CHECK-LABEL: rdar78233378.(file).P5@
26+
// CHECK-LABEL: Requirement signature: <Self where Self.T2 : P4>
27+
public protocol P5 {
28+
associatedtype T2: P4
29+
}

0 commit comments

Comments
 (0)