You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2021/03/29 15:29:10 UTC

[groovy] branch GROOVY_2_5_X updated: Fix for Grails?

This is an automated email from the ASF dual-hosted git repository.

emilles pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY_2_5_X by this push:
     new 4b818cc  Fix for Grails?
4b818cc is described below

commit 4b818cc41ee99f704f4a65910a8d8d890dcd6ae2
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Mon Mar 29 10:28:59 2021 -0500

    Fix for Grails?
---
 src/main/java/org/codehaus/groovy/ast/ClassNode.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/ast/ClassNode.java b/src/main/java/org/codehaus/groovy/ast/ClassNode.java
index 3935634..a443609 100644
--- a/src/main/java/org/codehaus/groovy/ast/ClassNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/ClassNode.java
@@ -1312,13 +1312,13 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
     private static boolean hasExactMatchingCompatibleType(final MethodNode match, final MethodNode maybe, final int i) {
         int lastParamIndex = maybe.getParameters().length - 1;
         return (i <= lastParamIndex && match.getParameters()[i].getType().equals(maybe.getParameters()[i].getType()))
-                || (i >= lastParamIndex && isPotentialVarArg(maybe, lastParamIndex) && match.getParameters()[i].getType().equals(maybe.getParameters()[lastParamIndex].getType().getComponentType()));
+                || (i >= lastParamIndex && isPotentialVarArg(maybe, lastParamIndex) && match.getParameters()[i].getType().equals(maybe.getParameters()[lastParamIndex].getType().componentType));
     }
 
     private static boolean hasCompatibleType(final TupleExpression args, final MethodNode method, final int i) {
         int lastParamIndex = method.getParameters().length - 1;
         return (i <= lastParamIndex && args.getExpression(i).getType().isDerivedFrom(method.getParameters()[i].getType()))
-                || (i >= lastParamIndex && isPotentialVarArg(method, lastParamIndex) && args.getExpression(i).getType().isDerivedFrom(method.getParameters()[lastParamIndex].getType().getComponentType()));
+                || (i >= lastParamIndex && isPotentialVarArg(method, lastParamIndex) && args.getExpression(i).getType().isDerivedFrom(method.getParameters()[lastParamIndex].getType().componentType));
     }
 
     private static boolean hasCompatibleNumberOfArgs(final MethodNode method, final int nArgs) {