Assuming a class A with a method foo() and a class B subclass of A. If an invoke opcode references the method B.foo() then the bytecode verifier raises an error with the following error message:
Referenced method 'foo' with expected signature '()void' not found in class 'B'. The native verifier does allow the method to be declared in some superinterface, which the Java Virtual Machine Specification, Second Edition does not.
I can't find where in the Java Virtual Machine Specification, Second Edition this restriction is defined.
The verification of the bytecode generated by the following code fails: