// RUN: %target-typecheck-verify-swift // This needs a better diagnostic. The real problem is the 'C == G' // requirement in P2 conflicts with the one in P1. protocol P { associatedtype I } struct G1 : P {} struct G2 : P { typealias I = G } struct G {} protocol P0 { associatedtype C : P } protocol P1 : P0 where C == G1 { associatedtype I } protocol P2 : P1 where C == G2 {} // expected-error@-1 {{cannot build rewrite system for protocol; concrete nesting limit exceeded}} // expected-note@-2 {{failed rewrite rule is [P2:I].[concrete: G>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] => [P2:I]}}