@@ -210,7 +210,7 @@ protocol ProtoAlias2 {
210
210
}
211
211
212
212
func basicConflict< T: ProtoAlias1 & ProtoAlias2 > ( _: T ) where T. A1 == T . A2 { }
213
- // expected-error@-1{{no type for 'T.A1' can satisfy both 'T.A1 == Int ' and 'T.A1 == String '}}
213
+ // expected-error@-1{{no type for 'T.A1' can satisfy both 'T.A1 == String ' and 'T.A1 == Int '}}
214
214
215
215
protocol RequiresAnyObject {
216
216
associatedtype A : AnyObject
@@ -231,14 +231,14 @@ func testMissingRequirements() {
231
231
// expected-error@-1{{no type for 'T.A' can satisfy both 'T.A == S' and 'T.A : AnyObject'}}
232
232
233
233
func conflict2< T: RequiresConformance > ( _: T ) where T. A == C { }
234
- // expected-error@-1{{no type for 'T.A' can satisfy both 'T.A : P ' and 'T.A == C '}}
234
+ // expected-error@-1{{no type for 'T.A' can satisfy both 'T.A == C ' and 'T.A : P '}}
235
235
236
236
class C { }
237
237
func conflict3< T: RequiresSuperclass > ( _: T ) where T. A == C { }
238
- // expected-error@-1{{no type for 'T.A' can satisfy both 'T.A : Super ' and 'T.A : C '}}
238
+ // expected-error@-1{{no type for 'T.A' can satisfy both 'T.A : C ' and 'T.A : Super '}}
239
239
240
240
func conflict4< T: RequiresSuperclass > ( _: T ) where T. A: C { }
241
- // expected-error@-1{{no type for 'T.A' can satisfy both 'T.A : Super ' and 'T.A : C '}}
241
+ // expected-error@-1{{no type for 'T.A' can satisfy both 'T.A : C ' and 'T.A : Super '}}
242
242
}
243
243
244
244
protocol Fooable {
@@ -265,51 +265,51 @@ func sameTypeConflicts() {
265
265
var bar : Y { return Y ( ) }
266
266
}
267
267
268
- // expected-error@+1{{no type for 'T.Foo' can satisfy both 'T.Foo == Y ' and 'T.Foo == X '}}
268
+ // expected-error@+1{{no type for 'T.Foo' can satisfy both 'T.Foo == X ' and 'T.Foo == Y '}}
269
269
func fail1<
270
270
T: Fooable , U: Fooable
271
271
> ( _ t: T , u: U ) -> ( X , Y )
272
272
where T. Foo == X , U. Foo == Y , T. Foo == U . Foo {
273
273
fatalError ( )
274
274
}
275
275
276
- // expected-error@+1{{no type for 'T.Foo' can satisfy both 'T.Foo == X ' and 'T.Foo == Y '}}
276
+ // expected-error@+1{{no type for 'T.Foo' can satisfy both 'T.Foo == Y ' and 'T.Foo == X '}}
277
277
func fail2<
278
278
T: Fooable , U: Fooable
279
279
> ( _ t: T , u: U ) -> ( X , Y )
280
280
where T. Foo == U . Foo , T. Foo == X , U. Foo == Y {
281
281
fatalError ( )
282
282
}
283
283
284
- // expected-error@+1{{no type for 'T.Bar' can satisfy both 'T.Bar : Fooable ' and 'T.Bar == X '}}
284
+ // expected-error@+1{{no type for 'T.Bar' can satisfy both 'T.Bar == X ' and 'T.Bar : Fooable '}}
285
285
func fail3< T: Barrable > ( _ t: T ) -> X
286
286
where T. Bar == X {
287
287
fatalError ( )
288
288
}
289
289
290
- // expected-error@+1{{no type for 'T.Bar.Foo' can satisfy both 'T.Bar.Foo == Z ' and 'T.Bar.Foo == X '}}
290
+ // expected-error@+1{{no type for 'T.Bar.Foo' can satisfy both 'T.Bar.Foo == X ' and 'T.Bar.Foo == Z '}}
291
291
func fail4< T: Barrable > ( _ t: T ) -> ( Y , Z )
292
292
where
293
293
T. Bar == Y ,
294
294
T. Bar. Foo == Z {
295
295
fatalError ( )
296
296
}
297
297
298
- // expected-error@+1{{no type for 'T.Bar.Foo' can satisfy both 'T.Bar.Foo == Z ' and 'T.Bar.Foo == X '}}
298
+ // expected-error@+1{{no type for 'T.Bar.Foo' can satisfy both 'T.Bar.Foo == X ' and 'T.Bar.Foo == Z '}}
299
299
func fail5< T: Barrable > ( _ t: T ) -> ( Y , Z )
300
300
where
301
301
T. Bar. Foo == Z ,
302
302
T. Bar == Y {
303
303
fatalError ( )
304
304
}
305
305
306
- // expected-error@+1{{no type for 'T.X' can satisfy both 'T.X == Int ' and 'T.X == String '}}
306
+ // expected-error@+1{{no type for 'T.X' can satisfy both 'T.X == String ' and 'T.X == Int '}}
307
307
func fail6< U, T: Concrete > ( _: U , _: T ) where T. X == String { }
308
308
309
309
struct G < T> { }
310
310
311
311
// FIXME: conflict diagnosed twice
312
- // expected-error@+1 2{{no type for 'T.X' can satisfy both 'T.X == Int ' and 'T.X == G<U.Foo> '}}
312
+ // expected-error@+1 2{{no type for 'T.X' can satisfy both 'T.X == G<U.Foo> ' and 'T.X == Int '}}
313
313
func fail7< U: Fooable , T: Concrete > ( _: U , _: T ) where T. X == G < U . Foo > { }
314
314
315
315
// FIXME: conflict diagnosed twice
@@ -318,6 +318,6 @@ func sameTypeConflicts() {
318
318
func fail8< T, U: Fooable > ( _: U , _: T ) where T == G < U . Foo > , T == Int { }
319
319
320
320
// FIXME: conflict diagnosed twice
321
- // expected-error@+1 2{{no type for 'T' can satisfy both 'T == Int ' and 'T == G<U.Foo> '}}
321
+ // expected-error@+1 2{{no type for 'T' can satisfy both 'T == G<U.Foo> ' and 'T == Int '}}
322
322
func fail9< T, U: Fooable > ( _: U , _: T ) where T == Int , T == G < U . Foo > { }
323
323
}
0 commit comments