File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -233,4 +233,23 @@ func useTrailingClosureGeneric<T>(t: T) {
233
233
_ = TrailingClosureGeneric < T > . noLabel { t }
234
234
_ = TrailingClosureGeneric< T> . twoElementsLabel( x: t) { t }
235
235
_ = TrailingClosureGeneric< T> . twoElementsNoLabel( t) { t }
236
+ }
237
+
238
+ enum SR7799 {
239
+ case one
240
+ case two
241
+ }
242
+
243
+ // CHECK-LABEL: sil hidden [ossa] @$s4enum6sr77993baryAA6SR7799OSg_tF : $@convention(thin) (Optional<SR7799>) -> () {
244
+ // CHECK: bb0(%0 : $Optional<SR7799>):
245
+ // CHECK-NEXT: debug_value %0 : $Optional<SR7799>, let, name "bar", argno 1
246
+ // CHECK-NEXT: switch_enum %0 : $Optional<SR7799>, case #Optional.some!enumelt.1: bb1, default bb4
247
+ // CHECK: bb1(%3 : $SR7799):
248
+ // CHECK-NEXT: switch_enum %3 : $SR7799, case #SR7799.one!enumelt: bb2, case #SR7799.two!enumelt: bb3
249
+ func sr7799( bar: SR7799 ? ) {
250
+ switch bar {
251
+ case . one: print ( " one " )
252
+ case . two? : print ( " two " )
253
+ default : print ( " default " )
254
+ }
236
255
}
You can’t perform that action at this time.
0 commit comments