@@ -61,32 +61,32 @@ func test3<T: Fooable, U: Fooable>(_ t: T, u: U) -> (X, X)
6161}
6262
6363// CHECK-LABEL: same_types.(file).fail1(_:u:)@
64- // CHECK-NEXT: Generic signature: <T, U where T : Fooable, U : Fooable, T.[Fooable]Foo == U.[Fooable]Foo>
64+ // CHECK-NEXT: Generic signature: <T, U where T : Fooable, U : Fooable, T.[Fooable]Foo == Y, U.[Fooable]Foo == Y >
6565func fail1< // expected-error{{no type for 'T.Foo' can satisfy both 'T.Foo == X' and 'T.Foo == Y'}}
6666 T: Fooable , U: Fooable
6767> ( _ t: T , u: U ) -> ( X , Y )
6868 where T. Foo == X , U. Foo == Y , T. Foo == U . Foo {
69- return ( t. foo, u. foo) // expected-error{{cannot convert return expression of type '(T.Foo, T.Foo )' to return type '(X, Y)'}}
69+ return ( t. foo, u. foo) // expected-error{{cannot convert return expression of type '(Y, Y )' to return type '(X, Y)'}}
7070}
7171
7272// CHECK-LABEL: same_types.(file).fail2(_:u:)@
73- // CHECK-NEXT: Generic signature: <T, U where T : Fooable, U : Fooable, T.[Fooable]Foo == U.[Fooable]Foo>
73+ // CHECK-NEXT: Generic signature: <T, U where T : Fooable, U : Fooable, T.[Fooable]Foo == X, U.[Fooable]Foo == X >
7474func fail2< // expected-error{{no type for 'T.Foo' can satisfy both 'T.Foo == Y' and 'T.Foo == X'}}
7575 T: Fooable , U: Fooable
7676> ( _ t: T , u: U ) -> ( X , Y )
7777 where T. Foo == U . Foo , T. Foo == X , U. Foo == Y {
78- return ( t. foo, u. foo) // expected-error{{cannot convert return expression of type '(T.Foo, T.Foo )' to return type '(X, Y)'}}
78+ return ( t. foo, u. foo) // expected-error{{cannot convert return expression of type '(X, X )' to return type '(X, Y)'}}
7979}
8080
8181func test4< T: Barrable > ( _ t: T ) -> Y where T. Bar == Y {
8282 return t. bar
8383}
8484
8585// CHECK-LABEL: same_types.(file).fail3@
86- // CHECK-NEXT: Generic signature: <T where T : Barrable>
86+ // CHECK-NEXT: Generic signature: <T where T : Barrable, T.[Barrable]Bar == X >
8787func fail3< T: Barrable > ( _ t: T ) -> X // expected-error {{no type for 'T.Bar' can satisfy both 'T.Bar == X' and 'T.Bar : Fooable'}}
8888 where T. Bar == X {
89- return t. bar // expected-error{{cannot convert return expression of type 'T.Bar' }}
89+ return t. bar
9090}
9191
9292func test5< T: Barrable > ( _ t: T ) -> X where T. Bar. Foo == X {
@@ -122,7 +122,7 @@ func fail5<T: Barrable>(_ t: T) -> (Y, Z)
122122}
123123
124124// CHECK-LABEL: same_types.(file).test8@
125- // CHECK-NEXT: Generic signature: <T where T : Fooable>
125+ // CHECK-NEXT: Generic signature: <T where T : Fooable, T.[Fooable]Foo == X >
126126func test8< T: Fooable > ( _ t: T ) // expected-error{{no type for 'T.Foo' can satisfy both 'T.Foo == Y' and 'T.Foo == X'}}
127127 where T. Foo == X ,
128128 T. Foo == Y { }
@@ -300,7 +300,7 @@ protocol P4 {
300300}
301301
302302// CHECK-LABEL: same_types.(file).test9@
303- // CHECK-NEXT: Generic signature: <T where T : P4>
303+ // CHECK-NEXT: Generic signature: <T where T : P4, T.[P4]A : P3, T.[P4]A == X >
304304func test9< T> ( _: T ) where T. A == X , T: P4 , T. A: P3 { } // expected-error{{no type for 'T.A' can satisfy both 'T.A == X' and 'T.A : P3'}}
305305
306306// Same-type constraint conflict through protocol where clauses.
@@ -318,7 +318,7 @@ struct X5a {}
318318struct X5b { }
319319
320320// CHECK-LABEL: same_types.(file).test9(_:u:)@
321- // CHECK-NEXT: Generic signature: <T, U where T : P6, U : P6, T.[P6]Bar == U.[P6]Bar>
321+ // CHECK-NEXT: Generic signature: <T, U where T : P6, U : P6, T.[P6]Bar == U.[P6]Bar, T.[P6]Bar.[P5]Foo1 == X5b >
322322func test9< T: P6 , U: P6 > ( _ t: T , u: U ) // expected-error{{no type for 'T.Bar.Foo1' can satisfy both 'T.Bar.Foo1 == X5a' and 'T.Bar.Foo1 == X5b'}}
323323 where T. Bar. Foo1 == X5a ,
324324 U. Bar. Foo2 == X5b ,
0 commit comments