// RUN: %target-swift-frontend -typecheck %s // https://github.com/apple/swift/issues/51951 protocol P1 { associatedtype A1 } protocol P2 { associatedtype A2 } struct S1: P1 where G1.A1 == G2.A1 { typealias A1 = G1.A1 } struct S2: P2 where G1.A1 == G2.A2 { typealias A2 = G2.A2 } struct S3 where G1.A1 == G2.A2 { func f(_: G) -> S3, S2> { fatalError() } }