// RUN: %target-typecheck-verify-swift // https://github.com/apple/swift/issues/55666 struct W {} struct S { init(){} // expected-note@+2 {{where 'C1.Element' = 'W', 'main.W' = 'main.W'}} // expected-note@+1 {{where 'C1.Element' = 'W', 'W' = 'W.Element>'}} init(_ c2: W) where C2: Collection, C1.Element == W {} // expected-note@+1 {{where 'C1.Element' = 'W', 'W' = 'W.Element>'}} static func f(_ c2: W) where C2: Collection, C1.Element == W {} // expected-note@+1 {{where 'C1.Element' = 'W', 'W' = 'W.Element>'}} func instancef(_ c2: W) where C2: Collection, C1.Element == W {} } let _ = S<[W]>(W<[Int]>()) // expected-error{{initializer 'init(_:)' requires the types 'W' and 'W.Element>' be equivalent}} let _ = S<[W]>.f(W<[Int]>()) // expected-error{{static method 'f' requires the types 'W' and 'W.Element>' be equivalent}} let _ = S<[W]>().instancef(W<[Int]>()) // expected-error{{instance method 'instancef' requires the types 'W' and 'W.Element>' be equivalent}} // Archetypes requirement failure func genericFunc(_ c2: W, c1: C1.Type) where C1.Element == W { let _ = S<[W]>(W()) // expected-error{{initializer 'init(_:)' requires the types 'W' and 'W' be equivalent}} }