// RUN: %target-typecheck-verify-swift struct W {} struct S { init(){} // expected-note@+2 {{where 'C1.Element' = 'String', 'W' = 'Int'}} // expected-note@+1 {{where 'C1.Element' = 'C1', 'W' = 'C2.Element'}} init(_ c2: W) where C2: Collection, C1.Element == W {} // expected-note@+1 {{where 'C1.Element' = 'String', 'W' = 'Int'}} static func f(_ c2: W) where C2: Collection, C1.Element == W {} // expected-note@+1 {{where 'C1.Element' = 'String', 'W' = 'Int'}} func instancef(_ c2: W) where C2: Collection, C1.Element == W {} } let _ = S<[W]>(W<[Int]>()) // expected-error{{initializer 'init(_:)' requires the types 'String' and 'Int' be equivalent}} let _ = S<[W]>.f(W<[Int]>()) // expected-error{{static method 'f' requires the types 'String' and 'Int' be equivalent}} let _ = S<[W]>().instancef(W<[Int]>()) // expected-error{{instance method 'instancef' requires the types 'String' and 'Int' 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 'C1' and 'C2.Element' be equivalent}} }