// RUN: %target-typecheck-verify-swift -warn-redundant-requirements // The GenericSignatureBuilder did not diagnose the first two. struct G1 {} // expected-warning@-1 {{redundant conformance constraint 'T' : 'BinaryInteger'}} struct G2 where T : BinaryInteger & FixedWidthInteger & UnsignedInteger & Codable {} // expected-warning@-1 {{redundant conformance constraint 'T' : 'BinaryInteger'}} struct G3 where T : BinaryInteger, T : FixedWidthInteger, T : UnsignedInteger & Codable {} // expected-warning@-1 {{redundant conformance constraint 'T' : 'BinaryInteger'}} // FIXME(rqm-diagnostics): These should also diagnose, but do not due to overly-eager // canonicalization in ProtocolCompositionType::get(). struct G1a {} struct G2a where T : BinaryInteger & FixedWidthInteger & UnsignedInteger {}