File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %target-typecheck-verify-swift
2
+
3
+ struct G < T> { }
4
+
5
+ protocol P {
6
+ associatedtype T
7
+ associatedtype U
8
+ }
9
+
10
+ protocol Q : P where T == G < U > { }
11
+
12
+ protocol R : Q where U == Int { }
13
+
14
+ struct X : R { }
Original file line number Diff line number Diff line change
1
+ // RUN: %target-typecheck-verify-swift
2
+
3
+ struct Composite < Foo> { }
4
+
5
+ protocol Chain {
6
+ associatedtype Next : Chain
7
+ associatedtype Foo = Composite < Next . Foo >
8
+ }
9
+
10
+ // expected-error@+3 {{cannot build rewrite system for protocol; rule length limit exceeded}}
11
+ // expected-note@+2 {{failed rewrite rule}}
12
+ // expected-error@+1 {{'Foo' is not a member type of type 'Self.Next'}}
13
+ protocol OtherChain where Foo == Composite < Next . Foo > {
14
+ associatedtype Next : OtherChain
15
+ associatedtype Foo
16
+ }
You can’t perform that action at this time.
0 commit comments