[SR-14883] Consider must
in diagnostic error message for empty switch
cases
#57230
Labels
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
good first issue
Good for newcomers
improvement
Additional Detail from JIRA
md5: c2b1762aef01cfc470f0706ce3ac5a80
Issue Description:
When compiling something like:
```
import Darwin
switch getpid() {
case 1:
default:
}
```
compilation fails with the following errors:
```
test.swift:4:1: error: 'case' label in a 'switch' should have at least one executable statement
case 1:
^~~~~~~
break
test.swift:5:1: error: 'default' label in a 'switch' should have at least one executable statement
default:
^~~~~~~~
break
```
Given that these are errors, it seems sensible (to me) to change the wording from `should` to `must`.
The text was updated successfully, but these errors were encountered: