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
#3264 has introduced a bug due to which on master we incorrectly report Duplicate case in some situations such as below:
public class X {
public static void main(String[] args) {
Integer i = 42;
switch (i) {
case 2 -> System.out.println(1);
case Integer ii when ii == 13 -> System.out.println("13");
case 13 -> System.out.println();
case 14 -> System.out.println();
default -> System.out.println("Default");
}
}
}
Basically, we need a pattern sandwiched between constants for the problem to show up.
Fortunately PR #3310 already addresses that. I will add a regression test from here
The text was updated successfully, but these errors were encountered:
Found by code inspection and white box testing:
#3264 has introduced a bug due to which on master we incorrectly report
Duplicate case
in some situations such as below:Basically, we need a pattern sandwiched between constants for the problem to show up.
Fortunately PR #3310 already addresses that. I will add a regression test from here
The text was updated successfully, but these errors were encountered: