@@ -8,6 +8,10 @@ public protocol P<A, B> {
8
8
associatedtype B
9
9
}
10
10
11
+ public protocol P1 < A> {
12
+ associatedtype A
13
+ }
14
+
11
15
public protocol Q < C> {
12
16
associatedtype C
13
17
}
@@ -34,16 +38,29 @@ public func foo(_ a: (any P<Int, Float> & Q<String> & R).Type) {}
34
38
public func foo( _ a: ( any P < Int , Float > & Q < String > & R & C < Bool > ) . Type) { }
35
39
public func foo( _ a: ( any P < Int , Float > & Q < String > & R & AnyObject ) . Type) { }
36
40
37
- public func foo( _ a: ( any P & R ) . Type) { }
38
- public func foo( _ a: ( any P & Q < String > ) . Type) { }
39
- public func foo( _ a: ( any P & Q < String > & R ) . Type) { }
40
- public func foo( _ a: ( any P & Q < String > & R & C < Bool > ) . Type) { }
41
- public func foo( _ a: ( any P & Q < String > & R & AnyObject ) . Type) { }
41
+ public func foo( _ a: ( any P & P1 ) . Type) { }
42
+ public func foo( _ a: ( any P & P1 < String > ) . Type) { }
43
+ public func foo( _ a: ( any P & P1 < String > & R ) . Type) { }
44
+ public func foo( _ a: ( any P & P1 < String > & R & C < Bool > ) . Type) { }
45
+ public func foo( _ a: ( any P & P1 < String > & R & AnyObject ) . Type) { }
46
+
47
+ public func foo( _ a: ( any P < Int , Float > & P1 ) . Type) { }
48
+ public func foo( _ a: ( any P < Int , Float > & P1 & R ) . Type) { }
49
+ public func foo( _ a: ( any P < Int , Float > & P1 & R & C < Bool > ) . Type) { }
50
+ public func foo( _ a: ( any P < Int , Float > & P1 & R & AnyObject ) . Type) { }
51
+
52
+ public protocol Q2 < C> : Q { }
53
+
54
+ public protocol Q3 < C> : Q {
55
+ associatedtype C
56
+ }
42
57
43
- public func foo( _ a: ( any P < Int , Float > & Q ) . Type) { }
44
- public func foo( _ a: ( any P < Int , Float > & Q & R ) . Type) { }
45
- public func foo( _ a: ( any P < Int , Float > & Q & R & C < Bool > ) . Type) { }
46
- public func foo( _ a: ( any P < Int , Float > & Q & R & AnyObject ) . Type) { }
58
+ public func foo( _ a: ( any Q2 < Int > & R ) . Type) { }
59
+ public func foo( _ a: ( any Q3 < Int > & R ) . Type) { }
60
+ public func foo( _ a: ( any Q2 & Q3 ) . Type) { }
61
+ public func foo( _ a: ( any Q2 & Q3 < Int > ) . Type) { }
62
+ public func foo2( _ a: ( any Q2 < Int > & Q3 ) . Type) { }
63
+ public func foo3( _ a: ( any Q2 < Int > & Q3 < Int > ) . Type) { }
47
64
48
65
public struct Foo < each T , U> {
49
66
public var a1 : ( repeat any P < each T , U > & R )
0 commit comments