// RUN: %target-typecheck-verify-swift struct G1 {} struct G2: AP { func f1(_: G1<(B) -> A>, _: G1) -> G1 { fatalError() } func f2(_: (A) -> C) -> G1 { fatalError() } } protocol OP: EP { associatedtype L associatedtype R func f1(_: G1, _: G1) -> G1 } extension OP { func f1(_: G1?, _: G1?) -> G1 { fatalError() } } protocol AP: OP where L == (B) -> A, R == B {} protocol EP { associatedtype A associatedtype B func f2(_: (A) -> C) -> G1 }