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
Copy file name to clipboardExpand all lines: test/Constraints/function_builder_diags.swift
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -589,4 +589,17 @@ struct MyView {
589
589
switchOptional.some(1){ // expected-error {{'switch' statement body must have at least one 'case' or 'default' block; do you want to add a default case?}}
590
590
}
591
591
}
592
+
593
+
@TupleBuildervarinvalidSwitchOne:someP{
594
+
switchOptional.some(1){
595
+
case . // expected-error {{expected ':' after 'case'}}
596
+
} // expected-error {{expected identifier after '.' expression}}
597
+
}
598
+
599
+
@TupleBuildervarinvalidSwitchMultiple:someP{
600
+
switchOptional.some(1){
601
+
case.none: // expected-error {{'case' label in a 'switch' should have at least one executable statement}}
602
+
case . // expected-error {{expected ':' after 'case'}}
603
+
} // expected-error {{expected identifier after '.' expression}}
0 commit comments