@@ -33,6 +33,7 @@ func free_bad<U>(_: U) {
33
33
34
34
struct Constrained < T: P1 > { }
35
35
// CHECK-LABEL: ExtensionDecl line={{.*}} base=Constrained
36
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=Constrained
36
37
// CHECK-NEXT: (normal_conformance type=Constrained<T> protocol=P2
37
38
// CHECK-NEXT: conforms_to: T P3)
38
39
extension Constrained : P2 where T: P3 { } // expected-note {{requirement from conditional conformance of 'Constrained<U>' to 'P2'}}
@@ -45,16 +46,19 @@ func constrained_bad<U: P1>(_: U) {
45
46
46
47
struct RedundantSame < T: P1 > { }
47
48
// CHECK-LABEL: ExtensionDecl line={{.*}} base=RedundantSame
49
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=RedundantSame
48
50
// CHECK-NEXT: (normal_conformance type=RedundantSame<T> protocol=P2)
49
51
extension RedundantSame : P2 where T: P1 { }
50
52
51
53
struct RedundantSuper < T: P4 > { }
52
54
// CHECK-LABEL: ExtensionDecl line={{.*}} base=RedundantSuper
55
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=RedundantSuper
53
56
// CHECK-NEXT: (normal_conformance type=RedundantSuper<T> protocol=P2)
54
57
extension RedundantSuper : P2 where T: P1 { }
55
58
56
59
struct OverlappingSub < T: P1 > { }
57
60
// CHECK-LABEL: ExtensionDecl line={{.*}} base=OverlappingSub
61
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=OverlappingSub
58
62
// CHECK-NEXT: (normal_conformance type=OverlappingSub<T> protocol=P2
59
63
// CHECK-NEXT: conforms_to: T P4)
60
64
extension OverlappingSub : P2 where T: P4 { } // expected-note {{requirement from conditional conformance of 'OverlappingSub<U>' to 'P2'}}
@@ -68,6 +72,7 @@ func overlapping_sub_bad<U: P1>(_: U) {
68
72
69
73
struct SameType < T> { }
70
74
// CHECK-LABEL: ExtensionDecl line={{.*}} base=SameType
75
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=SameType
71
76
// CHECK-NEXT: (normal_conformance type=SameType<T> protocol=P2
72
77
// CHECK-NEXT: same_type: T Int)
73
78
extension SameType : P2 where T == Int { }
@@ -84,6 +89,7 @@ func same_type_bad<U>(_: U) {
84
89
85
90
struct SameTypeGeneric < T, U> { }
86
91
// CHECK-LABEL: ExtensionDecl line={{.*}} base=SameTypeGeneric
92
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=SameTypeGeneric
87
93
// CHECK-NEXT: (normal_conformance type=SameTypeGeneric<T, U> protocol=P2
88
94
// CHECK-NEXT: same_type: T U)
89
95
extension SameTypeGeneric : P2 where T == U { }
@@ -109,6 +115,7 @@ func same_type_bad<U, V>(_: U, _: V) {
109
115
110
116
struct Infer < T, U> { }
111
117
// CHECK-LABEL: ExtensionDecl line={{.*}} base=Infer
118
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=Infer
112
119
// CHECK-NEXT: (normal_conformance type=Infer<T, U> protocol=P2
113
120
// CHECK-NEXT: same_type: T Constrained<U>
114
121
// CHECK-NEXT: conforms_to: U P1)
@@ -127,6 +134,7 @@ func infer_bad<U: P1, V>(_: U, _: V) {
127
134
128
135
struct InferRedundant < T, U: P1 > { }
129
136
// CHECK-LABEL: ExtensionDecl line={{.*}} base=InferRedundant
137
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=InferRedundant
130
138
// CHECK-NEXT: (normal_conformance type=InferRedundant<T, U> protocol=P2
131
139
// CHECK-NEXT: same_type: T Constrained<U>)
132
140
extension InferRedundant : P2 where T == Constrained < U > { }
@@ -147,6 +155,7 @@ class C3: C2 {}
147
155
148
156
struct ClassFree < T> { }
149
157
// CHECK-LABEL: ExtensionDecl line={{.*}} base=ClassFree
158
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=ClassFree
150
159
// CHECK-NEXT: (normal_conformance type=ClassFree<T> protocol=P2
151
160
// CHECK-NEXT: superclass: T C1)
152
161
extension ClassFree : P2 where T: C1 { } // expected-note {{requirement from conditional conformance of 'ClassFree<U>' to 'P2'}}
@@ -160,6 +169,7 @@ func class_free_bad<U>(_: U) {
160
169
161
170
struct ClassMoreSpecific < T: C1 > { }
162
171
// CHECK-LABEL: ExtensionDecl line={{.*}} base=ClassMoreSpecific
172
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=ClassMoreSpecific
163
173
// CHECK-NEXT: (normal_conformance type=ClassMoreSpecific<T> protocol=P2
164
174
// CHECK-NEXT: superclass: T C3)
165
175
extension ClassMoreSpecific : P2 where T: C3 { } // expected-note {{requirement from conditional conformance of 'ClassMoreSpecific<U>' to 'P2'}}
@@ -174,6 +184,7 @@ func class_more_specific_bad<U: C1>(_: U) {
174
184
175
185
struct ClassLessSpecific < T: C3 > { }
176
186
// CHECK-LABEL: ExtensionDecl line={{.*}} base=ClassLessSpecific
187
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=ClassLessSpecific
177
188
// CHECK-NEXT: (normal_conformance type=ClassLessSpecific<T> protocol=P2)
178
189
extension ClassLessSpecific : P2 where T: C1 { }
179
190
@@ -196,10 +207,12 @@ func subclass_bad() {
196
207
197
208
struct InheritEqual < T> { }
198
209
// CHECK-LABEL: ExtensionDecl line={{.*}} base=InheritEqual
210
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=InheritEqual
199
211
// CHECK-NEXT: (normal_conformance type=InheritEqual<T> protocol=P2
200
212
// CHECK-NEXT: conforms_to: T P1)
201
213
extension InheritEqual : P2 where T: P1 { } // expected-note {{requirement from conditional conformance of 'InheritEqual<U>' to 'P2'}}
202
214
// CHECK-LABEL: ExtensionDecl line={{.*}} base=InheritEqual
215
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=InheritEqual
203
216
// CHECK-NEXT: (normal_conformance type=InheritEqual<T> protocol=P5
204
217
// CHECK-NEXT: (normal_conformance type=InheritEqual<T> protocol=P2
205
218
// CHECK-NEXT: conforms_to: T P1)
@@ -224,10 +237,12 @@ extension InheritLess: P5 {} // expected-error{{type 'T' does not conform to pro
224
237
225
238
struct InheritMore < T> { }
226
239
// CHECK-LABEL: ExtensionDecl line={{.*}} base=InheritMore
240
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=InheritMore
227
241
// CHECK-NEXT: (normal_conformance type=InheritMore<T> protocol=P2
228
242
// CHECK-NEXT: conforms_to: T P1)
229
243
extension InheritMore : P2 where T: P1 { } // expected-note {{requirement from conditional conformance of 'InheritMore<U>' to 'P2'}}
230
244
// CHECK-LABEL: ExtensionDecl line={{.*}} base=InheritMore
245
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=InheritMore
231
246
// CHECK-NEXT: (normal_conformance type=InheritMore<T> protocol=P5
232
247
// CHECK-NEXT: (normal_conformance type=InheritMore<T> protocol=P2
233
248
// CHECK-NEXT: conforms_to: T P1)
@@ -311,11 +326,13 @@ extension TwoDisjointConformances: P2 where T == String {}
311
326
// true in the original type's generic signature.
312
327
struct RedundancyOrderDependenceGood < T: P1 , U> { }
313
328
// CHECK-LABEL: ExtensionDecl line={{.*}} base=RedundancyOrderDependenceGood
329
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=RedundancyOrderDependenceGood
314
330
// CHECK-NEXT: (normal_conformance type=RedundancyOrderDependenceGood<T, U> protocol=P2
315
331
// CHECK-NEXT: same_type: T U)
316
332
extension RedundancyOrderDependenceGood : P2 where U: P1 , T == U { }
317
333
struct RedundancyOrderDependenceBad < T, U: P1 > { }
318
334
// CHECK-LABEL: ExtensionDecl line={{.*}} base=RedundancyOrderDependenceBad
335
+ // CHECK-LABEL: ExtensionDecl line={{.*}} base=RedundancyOrderDependenceBad
319
336
// CHECK-NEXT: (normal_conformance type=RedundancyOrderDependenceBad<T, U> protocol=P2
320
337
// CHECK-NEXT: conforms_to: T P1
321
338
// CHECK-NEXT: same_type: T U)
0 commit comments