// RUN: %target-typecheck-verify-swift -target %target-swift-5.9-abi-triple struct Conformance {} _ = Conformance.self // ok _ = Conformance.self // expected-error {{type 'AnyObject' does not conform to protocol 'Equatable'}} class Class {} class OtherClass {} class Subclass: Class {} struct Superclass {} // expected-note {{requirement specified as 'each T' : 'Class' [with each T = OtherClass]}} _ = Superclass.self // ok _ = Superclass.self // expected-error {{'Superclass' requires that 'OtherClass' inherit from 'Class'}} struct Layout {} // expected-note {{requirement specified as 'each T' : 'AnyObject' [with each T = Int, String]}} _ = Layout.self // ok _ = Layout.self // expected-error {{'Layout' requires that 'Int' be a class type}} struct Outer { struct Inner where repeat (each T).Element == (each U).Element {} // expected-note@-1 {{requirement specified as '(each T).Element' == '(each U).Element' [with each T = Array, Array; each U = Set, Set]}} // expected-note@-2 {{requirement specified as '(each T).Element' == '(each U).Element' [with each T = Array; each U = Set, Set]}} struct InnerShape where (repeat (each T, each U)): Any {} // expected-note@-1 {{same-shape requirement inferred between 'each T' and 'each U' [with each T = Array; each U = Set, Set]}} } _ = Outer, Array>.Inner, Set>.self // ok _ = Outer, Array>.Inner, Set>.self // expected-error {{'Outer, Array>.Inner' requires the types 'Int, String' and 'String, Int' be equivalent}} _ = Outer>.Inner, Set>.self // expected-error {{'Outer>.Inner' requires the types 'Int' and 'Int, String' be equivalent}} _ = Outer, Array>.InnerShape, Set>.self // ok _ = Outer>.InnerShape, Set>.self // expected-error {{'Outer>.InnerShape' requires the type packs 'Array' and 'Set, Set' have the same shape}}