You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2020/01/27 10:18:00 UTC

[jira] [Updated] (GROOVY-4502) Move Closure Class generation logic into a much earlier phase

     [ https://issues.apache.org/jira/browse/GROOVY-4502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King updated GROOVY-4502:
------------------------------
    Fix Version/s:     (was: 3.x)
                   4.x

> Move Closure Class generation logic into a much earlier phase
> -------------------------------------------------------------
>
>                 Key: GROOVY-4502
>                 URL: https://issues.apache.org/jira/browse/GROOVY-4502
>             Project: Groovy
>          Issue Type: Improvement
>          Components: Compiler
>            Reporter: Jochen Theodorou
>            Priority: Major
>             Fix For: 4.x
>
>
> ClosureExpression should get a new field storing the class that will be used for this expression, and also provide a static method for the class name generation. the field should be set in APP already and the ClassNode added as primary ClassNode to the compile unit. Possible problem here, VariableScopeVisitor and maybe the StaticImoprtVisitor should skip the class and instead still work on the expression contents. Here is potential for breaking existing user code. The static method can be used by people adding closures themselfes and wanting to keep the naming scheme. Since that usually works using an count, a possible other place is in ClassNode as instance method



--
This message was sent by Atlassian Jira
(v8.3.4#803005)