// RUN: not %target-swift-frontend -typecheck %s struct S {} protocol P { associatedtype A: P = Self static func f(_ x: A) -> A } extension S: P where N: P { static func f(_ x: X) -> S where A == X, X.A == N { return S() } }