Github user blackdrag commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/708#discussion_r188821671
  
    --- Diff: 
src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticInvocationWriter.java 
---
    @@ -468,7 +469,11 @@ protected void loadArguments(List<Expression> 
argumentList, Parameter[] para) {
                     expression.putNodeMetaData(PARAMETER_TYPE, 
para[i].getType());
                     expression.visit(acg);
                     if (!isNullConstant(expression)) {
    -                    operandStack.doGroovyCast(para[i].getType());
    +                    if (expression instanceof GStringExpression) {
    +                        operandStack.doGroovyCast(ClassHelper.STRING_TYPE);
    --- End diff --
    
    what if the method has a GString parameter? Converting to string is then 
wrong. You should add a test for this


---

Reply via email to