From 01da5fd5443f61c960aa06f0e3e720bf4a549b07 Mon Sep 17 00:00:00 2001 From: Chicken-Bones Date: Wed, 1 Oct 2014 10:04:26 +1000 Subject: [PATCH] Make ASM fix backwards compatible --- src/codechicken/multipart/asm/ASMMixinCompiler.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/codechicken/multipart/asm/ASMMixinCompiler.scala b/src/codechicken/multipart/asm/ASMMixinCompiler.scala index 1b19661..bd8bfbe 100644 --- a/src/codechicken/multipart/asm/ASMMixinCompiler.scala +++ b/src/codechicken/multipart/asm/ASMMixinCompiler.scala @@ -440,9 +440,8 @@ object ASMMixinCompiler case INVOKEVIRTUAL => if (minsn.owner.equals(cnode.name)) { if (methodSigs.contains(minsn.name + minsn.desc)) {//call the interface method - minsn.setOpcode(INVOKEINTERFACE) - minsn.itf = true - }else { + replace(new MethodInsnNode(INVOKEINTERFACE, minsn.owner, minsn.name, minsn.desc)) + } else { //cast to parent class and call val mType = Type.getMethodType(minsn.desc) val instanceEntry = stack.peek(width(mType.getArgumentTypes))