Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
If I use @Newify on a local variable declaration, I am getting an error that the class value is not resolvable.
@Newify(Date) def d = Date(1234L)
results in:
Script1.groovy: 1: Error during @Newify processing. Annotation parameter must be a class or list of classes but found an unresolvable reference to 'Date'. @ line 1, column 9. @Newify(Date) ^
It looks like org.codehaus.groovy.classgen.VariableScopeVisitor.visitDeclarationExpression is missing a call to visitAnnotations. Classes, fields, and methods all have this call. When I add it, the VariableExpression resolves to a ClassExpression as expected.
Attachments
Issue Links
- links to