@@ -71,7 +71,7 @@ default:
71
71
}
72
72
73
73
// Multiple cases per case block
74
- switch x { // expected-error {{switch must be exhaustive, consider adding a default clause: }}
74
+ switch x { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause? }}
75
75
case 0 : // expected-error {{'case' label in a 'switch' should have at least one executable statement}} {{8-8= break}}
76
76
case 1 :
77
77
x = 0
@@ -83,7 +83,7 @@ default:
83
83
x = 0
84
84
}
85
85
86
- switch x { // expected-error {{switch must be exhaustive, consider adding a default clause: }}
86
+ switch x { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause? }}
87
87
case 0 :
88
88
x = 0
89
89
case 1 : // expected-error {{'case' label in a 'switch' should have at least one executable statement}} {{8-8= break}}
@@ -95,7 +95,7 @@ case 0:
95
95
default : // expected-error {{'default' label in a 'switch' should have at least one executable statement}} {{9-9= break}}
96
96
}
97
97
98
- switch x { // expected-error {{switch must be exhaustive, consider adding a default clause: }}
98
+ switch x { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause? }}
99
99
case 0 :
100
100
; // expected-error {{';' statements are not allowed}} {{3-5=}}
101
101
case 1 :
@@ -142,22 +142,22 @@ default: // expected-error{{additional 'case' blocks cannot appear after the 'de
142
142
x = 0
143
143
}
144
144
145
- switch x { // expected-error {{switch must be exhaustive, consider adding a default clause: }}
145
+ switch x { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause? }}
146
146
default where x == 0 : // expected-error{{'default' cannot be used with a 'where' guard expression}}
147
147
x = 0
148
148
}
149
149
150
- switch x { // expected-error {{switch must be exhaustive, consider adding a default clause: }}
150
+ switch x { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause? }}
151
151
case 0 : // expected-error {{'case' label in a 'switch' should have at least one executable statement}} {{8-8= break}}
152
152
}
153
153
154
- switch x { // expected-error {{switch must be exhaustive, consider adding a default clause: }}
154
+ switch x { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause? }}
155
155
case 0 : // expected-error{{'case' label in a 'switch' should have at least one executable statement}} {{8-8= break}}
156
156
case 1 :
157
157
x = 0
158
158
}
159
159
160
- switch x { // expected-error {{switch must be exhaustive, consider adding a default clause: }}
160
+ switch x { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause? }}
161
161
case 0 :
162
162
x = 0
163
163
case 1 : // expected-error{{'case' label in a 'switch' should have at least one executable statement}} {{8-8= break}}
@@ -260,7 +260,7 @@ case (var a, var b): // expected-warning {{variable 'a' was never mutated; consi
260
260
}
261
261
262
262
func test_label( x : Int ) {
263
- Gronk: // expected-error {{switch must be exhaustive, consider adding a default clause: }}
263
+ Gronk: // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause? }}
264
264
switch x {
265
265
case 42 : return
266
266
}
0 commit comments