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

[jira] [Commented] (GROOVY-10248) Groovy ResolveVisitor runs twice

    [ https://issues.apache.org/jira/browse/GROOVY-10248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17425729#comment-17425729 ] 

Eric Milles commented on GROOVY-10248:
--------------------------------------

https://github.com/apache/groovy/pull/1640

> Groovy ResolveVisitor runs twice
> --------------------------------
>
>                 Key: GROOVY-10248
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10248
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>            Reporter: Svatopluk Dedic
>            Assignee: Eric Milles
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> CompilationUnit [runs ResolveVisitor explicitly|https://github.com/groovy/groovy-core/blob/master/src/main/org/codehaus/groovy/control/CompilationUnit.java#L541] but the resolver is also registered as a [regular PhaseOperation|https://github.com/groovy/groovy-core/blob/master/src/main/org/codehaus/groovy/control/CompilationUnit.java#L178].
> It's not that big deal, as classes resolved in the 1st pass are relatively quickly determined as resolved. But still the whole AST source must be traversed.
> The ISourceUnitOperation's guard (check source.phase against unit.phase) does not work here, as the explicit resolver cannot upgrade the source's phase (not all operations completed).



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