eclipse-jdt / eclipse-jdt/eclipse.jdt.core
ECJ doesn't report expected error about domination
Open
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
Here's the testcase:
```
public class X {
public int foo(Character c) {
int result = 0;
switch (c) {
case Character c1 -> {
result = c1;
break;
}
case 0 -> { // Same goes for case (int) 0
result = 0;
break;
}
}
return result;
}
}
```
Javac reports this -` error: this case label is dominated by a preceding case label` but we allow this.
Contributor guide
Assessment
This issue has not been assessed yet.