Here's an example:
public interface MyInterface {
default int foo() {
}
int i = foo();
}
javac reports two errors:
- There's no return statement in the default implementation of
foo()
foo() is not static, so it can't be called to initialize i
ecj only reports the second error. If the declaration for i is removed completely, then it will report the first error.