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

Radoslav Ivanov commented on GROOVY-9265:
-----------------------------------------

[~daniel_sun], could you please provide a fix for 2.5.9 and let us know what is 
the planned release date? Thank you.

> ScriptMain.groovy: -1: Access to bugs.ClassWithInnerClass$InnerClass#obj is 
> forbidden @ line -1, column -1.
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-9265
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9265
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static compilation
>    Affects Versions: 2.5.8, 3.0.0-beta-3
>            Reporter: Knut Saua Mathiesen
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 3.0.0-rc-1
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> bugs.ScriptMain.groovy:
> {code:groovy}
> package bugs
> import groovy.transform.CompileStatic
> @CompileStatic
> public class ScriptMain {
>     static void method(Closure closureToInvoke) {
>         closureToInvoke.run()
>     }
>     public static void main(String[] args) {
>         method({
>             def obj = new ClassWithInnerClass.InnerClass()
>             println obj.field
>         })
>     }
> }{code}
> bugs.ClassWithInnerClass.*java*: 
> {code:java}
> package bugs;
> public class ClassWithInnerClass {
>     public static class InnerClass {
>         public int field = 123;
>     }
> }
> {code}
> Errors out with:
> {code:java}
> Access to bugs.ClassWithInnerClass$InnerClass#obj is forbidden @ line 14, 
> column 21.
>                println obj.field {code}
> This works fine on groovy 2.5.6. But does not work neither 2.5.7, 2.5.8 nor 
> 3.0.0-beta-3.
> This appears highly related to GROOVY-9005. However from what I can see that 
> regression happens on *2.5.6* not on *2.5.7.*



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

Reply via email to