-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
None
-
generic
-
generic
Consider this corner case:
public class X {
public static void main(String args[]) {
Object o = "Hello";
if (o __matches String x __matches boolean b1 __matches boolean b2 __matches true) {
System.out.println(x);
}
}
}
I would expect x to be in scope inside the if {} - it is not:
/home/srikanth/tmp/X.java:6: error: cannot find symbol
System.out.println(x);
^
symbol: variable x
location: class X
1 error
public class X {
public static void main(String args[]) {
Object o = "Hello";
if (o __matches String x __matches boolean b1 __matches boolean b2 __matches true) {
System.out.println(x);
}
}
}
I would expect x to be in scope inside the if {} - it is not:
/home/srikanth/tmp/X.java:6: error: cannot find symbol
System.out.println(x);
^
symbol: variable x
location: class X
1 error