@@ -7,26 +7,26 @@ protocol P {
7
7
8
8
// Anything that mentions 'T : P' minimizes to 'U : P'.
9
9
10
- // expected-warning@+2 {{redundant conformance constraint 'U': 'P'}}
11
- // expected-note@+1 {{conformance constraint 'U': 'P' implied here}}
10
+ // expected-warning@+2 {{redundant conformance constraint 'U' : 'P'}}
11
+ // expected-note@+1 {{conformance constraint 'U' : 'P' implied here}}
12
12
func oneProtocol1< T, U> ( _: T , _: U ) where T : P , U : P , T. X == U , U. X == T { }
13
13
// CHECK-LABEL: oneProtocol1
14
14
// CHECK: Generic signature: <T, U where T : P, T == U.X, U == T.X>
15
15
16
- // expected-warning@+2 {{redundant conformance constraint 'U': 'P'}}
17
- // expected-note@+1 {{conformance constraint 'U': 'P' implied here}}
16
+ // expected-warning@+2 {{redundant conformance constraint 'U' : 'P'}}
17
+ // expected-note@+1 {{conformance constraint 'U' : 'P' implied here}}
18
18
func oneProtocol2< T, U> ( _: T , _: U ) where U : P , T : P , T. X == U , U. X == T { }
19
19
// CHECK-LABEL: oneProtocol2
20
20
// CHECK: Generic signature: <T, U where T : P, T == U.X, U == T.X>
21
21
22
- // expected-warning@+2 {{redundant conformance constraint 'U': 'P'}}
23
- // expected-note@+1 {{conformance constraint 'U': 'P' implied here}}
22
+ // expected-warning@+2 {{redundant conformance constraint 'U' : 'P'}}
23
+ // expected-note@+1 {{conformance constraint 'U' : 'P' implied here}}
24
24
func oneProtocol3< T, U> ( _: T , _: U ) where T : P , T. X == U , U : P , U. X == T { }
25
25
// CHECK-LABEL: oneProtocol3
26
26
// CHECK: Generic signature: <T, U where T : P, T == U.X, U == T.X>
27
27
28
- // expected-warning@+2 {{redundant conformance constraint 'U': 'P'}}
29
- // expected-note@+1 {{conformance constraint 'U': 'P' implied here}}
28
+ // expected-warning@+2 {{redundant conformance constraint 'U' : 'P'}}
29
+ // expected-note@+1 {{conformance constraint 'U' : 'P' implied here}}
30
30
func oneProtocol4< T, U> ( _: T , _: U ) where U : P , T. X == U , T : P , U. X == T { }
31
31
// CHECK-LABEL: oneProtocol4
32
32
// CHECK: Generic signature: <T, U where T : P, T == U.X, U == T.X>
@@ -59,38 +59,38 @@ protocol P2 {
59
59
associatedtype Y : P1
60
60
}
61
61
62
- // expected-warning@+2 {{redundant conformance constraint 'U': 'P2'}}
63
- // expected-note@+1 {{conformance constraint 'U': 'P2' implied here}}
62
+ // expected-warning@+2 {{redundant conformance constraint 'U' : 'P2'}}
63
+ // expected-note@+1 {{conformance constraint 'U' : 'P2' implied here}}
64
64
func twoProtocols1< T, U> ( _: T , _: U ) where T : P1 , U : P2 , T. X == U , U. Y == T { }
65
65
// CHECK-LABEL: twoProtocols1
66
66
// CHECK: Generic signature: <T, U where T : P1, T == U.Y, U == T.X>
67
67
68
- // expected-warning@+2 {{redundant conformance constraint 'U': 'P2'}}
69
- // expected-note@+1 {{conformance constraint 'U': 'P2' implied here}}
68
+ // expected-warning@+2 {{redundant conformance constraint 'U' : 'P2'}}
69
+ // expected-note@+1 {{conformance constraint 'U' : 'P2' implied here}}
70
70
func twoProtocols2< T, U> ( _: T , _: U ) where U : P2 , T : P1 , T. X == U , U. Y == T { }
71
71
// CHECK-LABEL: twoProtocols2
72
72
// CHECK: Generic signature: <T, U where T : P1, T == U.Y, U == T.X>
73
73
74
- // expected-warning@+2 {{redundant conformance constraint 'U': 'P2'}}
75
- // expected-note@+1 {{conformance constraint 'U': 'P2' implied here}}
74
+ // expected-warning@+2 {{redundant conformance constraint 'U' : 'P2'}}
75
+ // expected-note@+1 {{conformance constraint 'U' : 'P2' implied here}}
76
76
func twoProtocols3< T, U> ( _: T , _: U ) where T : P1 , T. X == U , U : P2 , U. Y == T { }
77
77
// CHECK-LABEL: twoProtocols3
78
78
// CHECK: Generic signature: <T, U where T : P1, T == U.Y, U == T.X>
79
79
80
- // expected-warning@+2 {{redundant conformance constraint 'U': 'P2'}}
81
- // expected-note@+1 {{conformance constraint 'U': 'P2' implied here}}
80
+ // expected-warning@+2 {{redundant conformance constraint 'U' : 'P2'}}
81
+ // expected-note@+1 {{conformance constraint 'U' : 'P2' implied here}}
82
82
func twoProtocols4< T, U> ( _: T , _: U ) where U : P2 , T. X == U , T : P1 , U. Y == T { }
83
83
// CHECK-LABEL: twoProtocols4
84
84
// CHECK: Generic signature: <T, U where T : P1, T == U.Y, U == T.X>
85
85
86
- // expected-warning@+2 {{redundant conformance constraint 'U': 'P2'}}
87
- // expected-note@+1 {{conformance constraint 'U': 'P2' implied here}}
86
+ // expected-warning@+2 {{redundant conformance constraint 'U' : 'P2'}}
87
+ // expected-note@+1 {{conformance constraint 'U' : 'P2' implied here}}
88
88
func twoProtocols5< T, U> ( _: T , _: U ) where T : P1 , T. X == U , U. Y == T , U : P2 { }
89
89
// CHECK-LABEL: twoProtocols5
90
90
// CHECK: Generic signature: <T, U where T : P1, T == U.Y, U == T.X>
91
91
92
- // expected-warning@+2 {{redundant conformance constraint 'T': 'P1'}}
93
- // expected-note@+1 {{conformance constraint 'T': 'P1' implied here}}
92
+ // expected-warning@+2 {{redundant conformance constraint 'T' : 'P1'}}
93
+ // expected-note@+1 {{conformance constraint 'T' : 'P1' implied here}}
94
94
func twoProtocols6< T, U> ( _: T , _: U ) where U : P2 , T. X == U , U. Y == T , T : P1 { }
95
95
// CHECK-LABEL: twoProtocols6
96
96
// CHECK: Generic signature: <T, U where T == U.Y, U : P2, U == T.X>
0 commit comments