bugfix for wrong opcode emitted when writing checkcast instruction
Fix opcode written for checkcast
When writing code into a classfile using the InstructionWriter, the checkcast instruction generates an invalid opcode 0xbd (which actually represents a anewarray instruction).
Instead, the correct opcode 0xc0 should be written, as defined in the jvm spec [1].
[1] https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-6.html#jvms-6.5.checkcast
Linked Issue
The problem is reported in issue 12, which this Merge Request is meant to fix.
Edited by Ingo Budde