Commit 75a67140 authored by Skylot's avatar Skylot

fix: regenerate method code if unexpected instruction is found (#462)

parent 6339cc20
......@@ -559,7 +559,11 @@ public class InsnGen {
private void fallbackOnlyInsn(InsnNode insn) throws CodegenException {
if (!fallback) {
throw new CodegenException(insn.getType() + " can be used only in fallback mode");
String msg = insn.getType() + " instruction can be used only in fallback mode";
CodegenException e = new CodegenException(msg);
mth.addError(msg, e);
mth.getParentClass().getTopParentClass().add(AFlag.RESTART_CODEGEN);
throw e;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment