-
Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathconformance_requirement_in_original_protocol.swift
135 lines (93 loc) · 4.07 KB
/
conformance_requirement_in_original_protocol.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
// RUN: %target-swift-frontend -typecheck %s -debug-generic-signatures 2>&1 | %FileCheck %s
public protocol P1 {
associatedtype X
}
public protocol P2 {}
////
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q1a@
// CHECK-LABEL: Requirement signature: <Self where Self == Self.[Q1a]Y.[Q1b]Z, Self.[Q1a]Y : Q1b>
public protocol Q1a {
associatedtype Y : Q1b where Self == Self.Y.Z
}
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q1b@
// CHECK-LABEL: Requirement signature: <Self where Self.[Q1b]Z : P1, Self.[Q1b]Z : Q1a, Self.[Q1b]Z.[P1]X : P2>
public protocol Q1b {
associatedtype Z : Q1a, P1 where Self.Z.X : P2
}
////
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q2a@
// CHECK-LABEL: Requirement signature: <Self where Self.[Q2a]Z : P1, Self.[Q2a]Z : Q2b, Self.[Q2a]Z.[P1]X : P2>
public protocol Q2a {
associatedtype Z : Q2b, P1 where Self.Z.X : P2
}
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q2b@
// CHECK-LABEL: Requirement signature: <Self where Self == Self.[Q2b]Y.[Q2a]Z, Self.[Q2b]Y : Q2a>
public protocol Q2b {
associatedtype Y : Q2a where Self == Self.Y.Z
}
////
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q3a@
// CHECK-LABEL: Requirement signature: <Self where Self : P1, Self == Self.[Q3a]Y.[Q3b]Z, Self.[P1]X : P2, Self.[Q3a]Y : Q3b>
public protocol Q3a : P1 {
associatedtype Y : Q3b where Self == Self.Y.Z, Self.X : P2
}
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q3b@
// CHECK-LABEL: Requirement signature: <Self where Self.[Q3b]Z : Q3a>
public protocol Q3b {
associatedtype Z : Q3a
}
////
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q4a@
// CHECK-LABEL: Requirement signature: <Self where Self.[Q4a]Z : Q4b>
public protocol Q4a {
associatedtype Z : Q4b
}
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q4b@
// CHECK-LABEL: Requirement signature: <Self where Self : P1, Self == Self.[Q4b]Y.[Q4a]Z, Self.[P1]X : P2, Self.[Q4b]Y : Q4a>
public protocol Q4b : P1 {
associatedtype Y : Q4a where Self == Self.Y.Z, Self.X : P2
}
////
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q5a@
// CHECK-LABEL: Requirement signature: <Self where Self == Self.[Q5a]Y.[Q5b]Z, Self.[P1]X : P2, Self.[Q5a]Y : Q5b>
public protocol Q5a {
associatedtype Y : Q5b where Self == Self.Y.Z, Self.X : P2
}
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q5b@
// CHECK-LABEL: Requirement signature: <Self where Self.[Q5b]Z : P1, Self.[Q5b]Z : Q5a>
public protocol Q5b {
associatedtype Z : Q5a, P1
}
///
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q6a@
// CHECK-LABEL: Requirement signature: <Self where Self.[Q6a]Z : P1, Self.[Q6a]Z : Q6b>
public protocol Q6a {
associatedtype Z : Q6b, P1
}
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q6b@
// CHECK-LABEL: Requirement signature: <Self where Self == Self.[Q6b]Y.[Q6a]Z, Self.[P1]X : P2, Self.[Q6b]Y : Q6a>
public protocol Q6b {
associatedtype Y : Q6a where Self == Self.Y.Z, Self.X : P2
}
////
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q7a@
// CHECK-LABEL: Requirement signature: <Self where Self : P1, Self == Self.[Q7a]Y.[Q7b]Z, Self.[Q7a]Y : Q7b>
public protocol Q7a : P1 {
associatedtype Y : Q7b where Self == Self.Y.Z
}
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q7b@
// CHECK-LABEL: Requirement signature: <Self where Self.[Q7b]Z : Q7a, Self.[Q7b]Z.[P1]X : P2>
public protocol Q7b {
associatedtype Z : Q7a where Self.Z.X : P2
}
////
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q8a@
// CHECK-LABEL: Requirement signature: <Self where Self.[Q8a]Z : Q8b, Self.[Q8a]Z.[P1]X : P2>
public protocol Q8a {
associatedtype Z : Q8b where Self.Z.X : P2
}
// CHECK-LABEL: conformance_requirement_in_original_protocol.(file).Q8b@
// CHECK-LABEL: Requirement signature: <Self where Self : P1, Self == Self.[Q8b]Y.[Q8a]Z, Self.[Q8b]Y : Q8a>
public protocol Q8b : P1 {
associatedtype Y : Q8a where Self == Self.Y.Z
}