@@ -45,7 +45,7 @@ struct UnresolvedWithConcreteBase<A, B> {
4545// produces two warnings about redundant requirements.
4646struct OriginalExampleWithWarning < A, B> where A : P2 , B : P2 , A. T == B . T {
4747 // CHECK-LABEL: Generic signature: <A, B, C, D, E where A == S1<C, E, S2<D>>, B : P2, C : P1, D == B.[P2]T, E == D.[P1]T, B.[P2]T == C.[P1]T>
48- init < C, D, E> ( _: C )
48+ init < C, D, E> ( _: C ) // expected-warning {{redundant conformance constraint 'S1<C, C.T.T, S2<C.T>>' : 'P2'}}
4949 where C : P1 ,
5050 D : P1 , // expected-warning {{redundant conformance constraint 'D' : 'P1'}}
5151 C. T : P1 , // expected-warning {{redundant conformance constraint 'C.T' : 'P1'}}
@@ -57,7 +57,7 @@ struct OriginalExampleWithWarning<A, B> where A : P2, B : P2, A.T == B.T {
5757// Same as above but without the warnings.
5858struct OriginalExampleWithoutWarning < A, B> where A : P2 , B : P2 , A. T == B . T {
5959 // CHECK-LABEL: Generic signature: <A, B, C, D, E where A == S1<C, E, S2<D>>, B : P2, C : P1, D == B.[P2]T, E == D.[P1]T, B.[P2]T == C.[P1]T>
60- init < C, D, E> ( _: C )
60+ init < C, D, E> ( _: C ) // expected-warning {{redundant conformance constraint 'S1<C, C.T.T, S2<C.T>>' : 'P2'}}
6161 where C : P1 ,
6262 A == S1 < C , C . T . T , S2 < C . T > > ,
6363 C. T == D ,
@@ -67,7 +67,7 @@ struct OriginalExampleWithoutWarning<A, B> where A : P2, B : P2, A.T == B.T {
6767// Same as above but without unnecessary generic parameters.
6868struct WithoutBogusGenericParametersWithWarning < A, B> where A : P2 , B : P2 , A. T == B . T {
6969 // CHECK-LABEL: Generic signature: <A, B, C where A == S1<C, B.[P2]T.[P1]T, S2<B.[P2]T>>, B : P2, C : P1, B.[P2]T == C.[P1]T>
70- init < C> ( _: C )
70+ init < C> ( _: C ) // expected-warning {{redundant conformance constraint 'S1<C, C.T.T, S2<C.T>>' : 'P2'}}
7171 where C : P1 ,
7272 C. T : P1 , // expected-warning {{redundant conformance constraint 'C.T' : 'P1'}}
7373 A == S1 < C , C . T . T , S2 < C . T > > { }
@@ -77,7 +77,7 @@ struct WithoutBogusGenericParametersWithWarning<A, B> where A : P2, B : P2, A.T
7777// or the warning.
7878struct WithoutBogusGenericParametersWithoutWarning < A, B> where A : P2 , B : P2 , A. T == B . T {
7979 // CHECK-LABEL: Generic signature: <A, B, C where A == S1<C, B.[P2]T.[P1]T, S2<B.[P2]T>>, B : P2, C : P1, B.[P2]T == C.[P1]T>
80- init < C> ( _: C )
80+ init < C> ( _: C ) // expected-warning {{redundant conformance constraint 'S1<C, C.T.T, S2<C.T>>' : 'P2'}}
8181 where C : P1 ,
8282 A == S1 < C , C . T . T , S2 < C . T > > { }
8383}
0 commit comments