-
Type:
Bug
-
Resolution: Not an Issue
-
Priority:
P4
-
Affects Version/s: None
-
Component/s: tools
-
None
-
generic
-
generic
(This should perhaps be closed as won't fix ?)
Note that asymmetry in javac's treatment between argv array and the pattern binding variable array.
public class X {
public static void main(String args[]) {
Object o = null;
if (o __matches String x []) {
}
}
}
This program fails to compiler and elicits the following:
/home/srikanth/tmp/X.java:5: error: ')' expected
if (o __matches String x []) {
^
/home/srikanth/tmp/X.java:5: error: illegal start of expression
if (o __matches String x []) {
^
2 errors
Note that asymmetry in javac's treatment between argv array and the pattern binding variable array.
public class X {
public static void main(String args[]) {
Object o = null;
if (o __matches String x []) {
}
}
}
This program fails to compiler and elicits the following:
/home/srikanth/tmp/X.java:5: error: ')' expected
if (o __matches String x []) {
^
/home/srikanth/tmp/X.java:5: error: illegal start of expression
if (o __matches String x []) {
^
2 errors