- changed title to Exception checking error for anonymous class instance expressions
Exception checking error for anonymous class instance expressions
Issue #10
resolved
When compiling Junit 4.11 with JastAddJ 7.1.1-44-g4420934 Java SE 7
I get the following incorrect error message:
junit-r4.11/src/main/java/org/junit/experimental/max/MaxCore.java:116:
Semantic Error: the exception org.junit.runners.model.InitializationError is not thrown in the body of the try statement
Here is a small test that reproduces the same kind of error:
import java.io.IOException;
public class Test {
class Foo {
Foo() throws IOException {
throw new IOException("oops");
}
}
public void foo() {
try {
new Foo() { };
} catch (IOException e) {
}
}
}
Comments (4)
-
reporter -
reporter - edited description
Added test case.
-
reporter - edited description
-
reporter - changed status to resolved
- Log in to comment