-
Bug
-
Resolution: Fixed
-
P4
-
None
-
generic
-
generic
public class X {
public static void main(String [] args) {
Object o = args;
switch (o) {
case int x:
System.out.println("int x");
break;
}
}
}
while compiling results in:
/home/srikanth/tmp/X.java:1: error: bad operand types for binary operator '=='
public class X {
^
first type: int
second type: Object
1 error
public static void main(String [] args) {
Object o = args;
switch (o) {
case int x:
System.out.println("int x");
break;
}
}
}
while compiling results in:
/home/srikanth/tmp/X.java:1: error: bad operand types for binary operator '=='
public class X {
^
first type: int
second type: Object
1 error