-
Bug
-
Resolution: Duplicate
-
P3
-
7
-
unknown
-
generic
This program doesn't compile:
class Test {
Test(String... args) { }
public void test() {
new Test() {
void foo() { new java.io.Serializable() {}; };
};
}
}
Output from javac:
TestX.java:21: error: internal error; cannot instantiate <anonymous Test$1$1>() at <anonymous Serializable> to ()
void foo() { new java.io.Serializable() {}; };
^
1 error
class Test {
Test(String... args) { }
public void test() {
new Test() {
void foo() { new java.io.Serializable() {}; };
};
}
}
Output from javac:
TestX.java:21: error: internal error; cannot instantiate <anonymous Test$1$1>() at <anonymous Serializable> to ()
void foo() { new java.io.Serializable() {}; };
^
1 error
- duplicates
-
JDK-7043922 Regression: internal compiler error for nested anonymous inner class featuring varargs constructor
-
- Closed
-
- relates to
-
JDK-6723444 javac fails to substitute type variables into a constructor's throws clause
-
- Closed
-