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
Found by code inspection and white box testing. While compiling this code:
public class X<T> {
public static void main(String[] args) {
Boolean b = true;
switch (b) {
case true -> System.out.println("True");
case false -> System.out.println("False");
}
}
}
This comment which has been deleted from master may need addressing in the process of fixing this:
/* a default case is not needed for an exhaustive switch expression * we need to handle the default case to throw an error in order to make the stack map consistent. * All cases will return a value on the stack except the missing default case. * There is no returned value for the default case so we handle it with an exception thrown. */
Found by code inspection and white box testing. While compiling this code:
we generate this block of code:
BCI 54-64 is dead code as the switch is exhaustive and there can be no further evolution that can cause it to cease to be exhaustive.
Javac has the same defect. Plus javac is also unable to generate the code it generates as of JDK23 (Bootstrap method init error)
The text was updated successfully, but these errors were encountered: