Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix failing test. AST was missing type information for parameters, ca…

…using issues with object wrapping in Groovy 2.x and above
  • Loading branch information...
commit fd78e785eb865ef134c8e0e2f00fd7ecc459241d 1 parent e947ef1
@graemerocher graemerocher authored
View
7 ...ls-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsASTUtils.java
@@ -276,6 +276,7 @@ public static MethodNode addDelegateInstanceMethod(ClassNode classNode, Expressi
GrailsArtefactClassInjector.EMPTY_CLASS_ARRAY, methodBody);
methodNode.addAnnotations(declaredMethod.getAnnotations());
+
classNode.addMethod(methodNode);
return methodNode;
}
@@ -319,7 +320,7 @@ public static ArgumentListExpression createArgumentListFromParameters(Parameter[
}
for (Parameter parameterType : parameterTypes) {
- arguments.addExpression(new VariableExpression(parameterType.getName()));
+ arguments.addExpression(new VariableExpression(parameterType.getName(), nonGeneric(parameterType.getType())));
}
return arguments;
}
@@ -536,9 +537,7 @@ public static ClassNode nonGeneric(ClassNode type) {
}
if (type.isArray()) {
- final ClassNode nonGen = ClassHelper.makeWithoutCaching(Object.class);
- nonGen.setUsingGenerics(false);
- return nonGen.makeArray();
+ return type.getComponentType().getPlainNodeReference().makeArray();
}
return type.getPlainNodeReference();
Please sign in to comment.
Something went wrong with that request. Please try again.