[
https://issues.apache.org/jira/browse/GROOVY-7187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18149105#comment-18149105
]
Daniel Sun commented on GROOVY-7187:
------------------------------------
Fixed on master; added a regression test in
0f52be3f6a9469b36dbdb470f2975f63e443738b
(https://github.com/apache/groovy/commit/0f52be3f6a9469b36dbdb470f2975f63e443738b).
> Static method calls in AST Transformations fail when multiple scripts are
> called after each other.
> --------------------------------------------------------------------------------------------------
>
> Key: GROOVY-7187
> URL: https://issues.apache.org/jira/browse/GROOVY-7187
> Project: Groovy
> Issue Type: Bug
> Components: groovy-astbuilder
> Affects Versions: 2.3.4
> Reporter: Reinout Korbee
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 7.0.0-alpha-1
>
> Attachments: groovycompilerbug.txt
>
>
> A script has an annotation on a variable, for example:
> @Input("some.input.reference")
> def input
> An AST Transformation adds a method that initializes the input reference and
> the declaration is transformed to:
> def input = someMethod("some.input.reference")
> The someMethod() method contains a staticMethodCall.
> If several scripts that are instrumented this way are called after each other
> then in the second script always a GroovyBug exception occurs, see attachment.
> If the script is called stand-alone then everything is fine.
> The order in which the scripts is called doesn't matter.
> I included a more detailed code example in the attachment.
> It seems there is some kind of bug with static method calls in AST
> transformations.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)