Loading... (original) (raw)

The following invoke instructions are successfully executed:
invokestatic #3; //InterfaceMethod C.foo:()V
invokestatic #3; //Method I.foo:()V

where
class C {...}
interface I {...}

JVMS-5.4.3.3 Method Resolution:
" If C is an interface, method resolution throws an IncompatibleClassChangeError."
JVMS-5.4.3.4 Interface Method Resolution:
"If C is not an interface, interface method resolution throws an IncompatibleClassChangeError"

Test case attached(IntfMethod.java):
$ java -Xverify:all IntfMethod
testSpecialIntf: FAILED (no exception)
testStaticIntf: FAILED (no exception)
testSpecialClass: FAILED (no exception)
testStaticClass: FAILED (no exception)