Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_5_X b60919fad -> 421fd69ea


GROOVY-8529: InvocationWriter also needs fix for calling static interface 
methods


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/421fd69e
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/421fd69e
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/421fd69e

Branch: refs/heads/GROOVY_2_5_X
Commit: 421fd69ea3e4e67c66609066a41c9ed77138868d
Parents: b60919f
Author: Paul King <pa...@asert.com.au>
Authored: Thu Apr 5 08:28:28 2018 +1000
Committer: Paul King <pa...@asert.com.au>
Committed: Thu Apr 5 09:00:27 2018 +1000

----------------------------------------------------------------------
 .../java/org/codehaus/groovy/classgen/asm/InvocationWriter.java    | 2 +-
 src/main/java/org/codehaus/groovy/classgen/asm/MopWriter.java      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/421fd69e/src/main/java/org/codehaus/groovy/classgen/asm/InvocationWriter.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/codehaus/groovy/classgen/asm/InvocationWriter.java 
b/src/main/java/org/codehaus/groovy/classgen/asm/InvocationWriter.java
index 30ba01f..a7dd34c 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/InvocationWriter.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/InvocationWriter.java
@@ -225,7 +225,7 @@ public class InvocationWriter {
         loadArguments(args.getExpressions(), target.getParameters());
 
         String desc = 
BytecodeHelper.getMethodDescriptor(target.getReturnType(), 
target.getParameters());
-        mv.visitMethodInsn(opcode, owner, methodName, desc, opcode == 
INVOKEINTERFACE);
+        mv.visitMethodInsn(opcode, owner, methodName, desc, 
declaringClass.isInterface());
         ClassNode ret = target.getReturnType().redirect();
         if (ret==ClassHelper.VOID_TYPE) {
             ret = ClassHelper.OBJECT_TYPE;

http://git-wip-us.apache.org/repos/asf/groovy/blob/421fd69e/src/main/java/org/codehaus/groovy/classgen/asm/MopWriter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/MopWriter.java 
b/src/main/java/org/codehaus/groovy/classgen/asm/MopWriter.java
index 0781108..b9b1c4b 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/MopWriter.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/MopWriter.java
@@ -208,7 +208,7 @@ public class MopWriter {
             // JDK 8 support for default methods in interfaces
             // this should probably be strenghtened when we support the 
A.super.foo() syntax
             int opcode = 
declaringClass.isInterface()?INVOKEINTERFACE:INVOKESPECIAL;
-            mv.visitMethodInsn(opcode, 
BytecodeHelper.getClassInternalName(declaringClass), method.getName(), 
methodDescriptor, opcode == INVOKEINTERFACE);
+            mv.visitMethodInsn(opcode, 
BytecodeHelper.getClassInternalName(declaringClass), method.getName(), 
methodDescriptor, declaringClass.isInterface());
             BytecodeHelper.doReturn(mv, method.getReturnType());
             mv.visitMaxs(0, 0);
             mv.visitEnd();

Reply via email to