-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: None
-
Component/s: tools
-
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