File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ // RUN: %target-typecheck-verify-swift
2+
3+ // This needs a better diagnostic. The real problem is the 'C == G<I>'
4+ // requirement in P2 conflicts with the one in P1.
5+
6+ protocol P {
7+ associatedtype I
8+ }
9+
10+ struct G1 < I> : P { }
11+ struct G2 < T> : P {
12+ typealias I = G < T >
13+ }
14+
15+ struct G < T> { }
16+
17+ protocol P0 {
18+ associatedtype C : P
19+ }
20+
21+ protocol P1 : P0 where C == G1 < I > {
22+ associatedtype I
23+ }
24+
25+ protocol P2 : P1 where C == G2 < I > { }
26+ // expected-error@-1 {{cannot build rewrite system for protocol; concrete nesting limit exceeded}}
27+ // expected-note@-2 {{failed rewrite rule is [P2:I].[concrete: G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<G<[P2:I]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] => [P2:I]}}
You can’t perform that action at this time.
0 commit comments