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: switch_enum [[BORROWED_VALUE]] : $EnumSwitchTests.E, case #EnumSwitchTests.E.first!enumelt: [[BB_E_1:bb[0-9]+]], case #EnumSwitchTests.E.second!enumelt: [[BB_E_2:bb[0-9]+]], case #EnumSwitchTests.E.third!enumelt: [[BB_E_3:bb[0-9]+]], case #EnumSwitchTests.E.fourth!enumelt: [[BB_E_4:bb[0-9]+]]
711
717
//
@@ -758,10 +764,10 @@ var booleanGuard2: Bool { false }
758
764
// CHECK: br [[BB_CONT]]
759
765
//
760
766
// CHECK: [[BB_CONT]]:
761
-
// CHECK: destroy_value [[MARKED_VALUE]]
767
+
// CHECK: destroy_value [[ARG_MARKED_VALUE]]
762
768
// CHECK: } // end sil function '$s8moveonly15enumSwitchTest1yyAA04EnumC5TestsO1EOF'
if case .bar(let y)= x { _ = y } // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{27-27=consume }}
75
+
if case .bar(let y)= x { _ = y } // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{27-27=consume }}
76
76
77
-
guard case .bar(let y)= x else{return} // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{30-30=consume }}
77
+
guard case .bar(let y)= x else{return} // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{30-30=consume }}
78
78
_ = y
79
79
80
80
if case .bar(let z)= consume x { _ = z }
81
81
82
82
guard case .bar(let z)= consume x else{return}
83
83
_ = z
84
84
85
-
if case .bar(let a)=(x){ _ = a } // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{28-28=consume }}
85
+
if case .bar(let a)=(x){ _ = a } // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{28-28=consume }}
86
86
87
-
guard case .bar(let a)=(x)else{return} // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{31-31=consume }}
87
+
guard case .bar(let a)=(x)else{return} // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{31-31=consume }}
if case .bar(let y)= x { _ = y } // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{31-31=consume }}
96
+
if case .bar(let y)= x { _ = y } // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{31-31=consume }}
97
97
}
98
98
99
99
let _:()->()={
100
-
guard case .bar(let y)= x else{return} // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{34-34=consume }}
100
+
guard case .bar(let y)= x else{return} // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{34-34=consume }}
if case .bar(let a)=(x){ _ = a } // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{32-32=consume }}
114
+
if case .bar(let a)=(x){ _ = a } // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{32-32=consume }}
115
115
}
116
116
117
117
let _:()->()={
118
-
guard case .bar(let a)=(x)else{return} // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{35-35=consume }}
118
+
guard case .bar(let a)=(x)else{return} // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{35-35=consume }}
if case .bar(let y)= x { _ = y } // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{27-27=consume }}
183
+
if case .bar(let y)= x { _ = y } // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{27-27=consume }}
184
184
185
-
guard case .bar(let y)= x else{return} // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{30-30=consume }}
185
+
guard case .bar(let y)= x else{return} // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{30-30=consume }}
186
186
_ = y
187
187
188
188
if case .bar(let z)= consume x { _ = z }
189
189
190
190
guard case .bar(let z)= consume x else{return}
191
191
_ = z
192
192
193
-
if case .bar(let a)=(x){ _ = a } // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{28-28=consume }}
193
+
if case .bar(let a)=(x){ _ = a } // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{28-28=consume }}
194
194
195
-
guard case .bar(let a)=(x)else{return} // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{31-31=consume }}
195
+
guard case .bar(let a)=(x)else{return} // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{31-31=consume }}
if case .bar(let y)= x { _ = y } // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{31-31=consume }}
204
+
if case .bar(let y)= x { _ = y } // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{31-31=consume }}
205
205
}
206
206
207
207
let _:()->()={
208
-
guard case .bar(let y)= x else{return} // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{34-34=consume }}
208
+
guard case .bar(let y)= x else{return} // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{34-34=consume }}
if case .bar(let a)=(x){ _ = a } // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{32-32=consume }}
222
+
if case .bar(let a)=(x){ _ = a } // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{32-32=consume }}
223
223
}
224
224
225
225
let _:()->()={
226
-
guard case .bar(let a)=(x)else{return} // expected-warning{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{35-35=consume }}
226
+
guard case .bar(let a)=(x)else{return} // expected-error{{noncopyable binding being pattern-matched must have the 'consume' operator applied}} {{35-35=consume }}
0 commit comments