You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// CHECK: Canonical generic signature: <τ_0_0 where τ_0_0 : CopyP>
39
+
func compose3(_ t:someCopyP&~Copyable){}
40
+
41
+
// CHECK-LABEL: .compose4@
42
+
// CHECK: Canonical generic signature: <τ_0_0 where τ_0_0 : NoCopyP>
43
+
func compose4(_ t:inoutsomeNoCopyP&~Copyable){}
44
+
45
+
// CHECK-LABEL: .f1@
46
+
// CHECK: Generic signature: <T where T : Copyable, T : NoCopyP>
47
+
func f1<T:NoCopyP>(_ t:T){}
48
+
13
49
// CHECK-LABEL: .withSome@
14
50
// CHECK: Canonical generic signature: <τ_0_0 where τ_0_0 : Copyable>
15
51
func withSome(_ t:someAny){}
@@ -44,7 +80,7 @@ class C1_IC<T: ~Copyable, U> {}
44
80
45
81
// CHECK-LABEL: .C1_CI@
46
82
// CHECK: Generic signature: <T, U where T : Copyable>
47
-
classC1_CI<T, U:~Copyable>{}
83
+
classC1_CI<T, U>where U:~Copyable {}
48
84
49
85
// CHECK-LABEL: .C1_II@
50
86
// CHECK: Generic signature: <T, U>
@@ -54,9 +90,25 @@ class C1_II<T: ~Copyable, U: ~Copyable> {}
54
90
// CHECK: Requirement signature: <Self>
55
91
protocolNoCopyP:~Copyable {}
56
92
57
-
// CHECK-LABEL: .P1@
93
+
// CHECK-LABEL: .NoCopyP2@
94
+
// CHECK: Requirement signature: <Self where Self : NoCopyP>
95
+
protocol NoCopyP2 where Self:~Copyable & NoCopyP {}
96
+
97
+
// CHECK-LABEL: .CopyP@
58
98
// CHECK: Requirement signature: <Self where Self : Copyable>
59
-
protocolP1{}
99
+
protocolCopyP{}
100
+
101
+
// CHECK-LABEL: .CopyP2@
102
+
// CHECK: Requirement signature: <Self where Self : CopyP>
103
+
protocolCopyP2:CopyP,~Copyable {} // expected-warning {{protocol 'CopyP2' should be declared to refine 'Copyable' due to a same-type constraint on 'Self'}}
104
+
105
+
// CHECK-LABEL: .CopyP2_Fixed@
106
+
// CHECK: Requirement signature: <Self where Self : CopyP>
0 commit comments