eclipse-jdt / eclipse-jdt/eclipse.jdt.ui
[19] No quickfix offered when a switch case is reported to have both unconditional pattern and default label
Open
- Dominant language
- Java
- Stars
- 59
- Forks
- 127
- Avg merge
- 22h 47m
- Merged PRs (30d)
- 28
Description
The following code, when preview is enabled, is reported for an error:
```
int res = switch(r) {
case Rectangle3 r1 -> {
yield 1;
}
default -> 0;
};
```
The error reported is : `Switch case cannot have both unconditional pattern and default label`
However, there's no quickfix provided to remove the default label. It would be helpful for the user to provide one.
Contributor guide
Assessment
This issue has not been assessed yet.