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

Eric Milles edited comment on GROOVY-9043 at 5/6/19 3:41 PM:
-------------------------------------------------------------

I see the tests: 
https://github.com/apache/groovy/blob/master/src/test/org/codehaus/groovy/transform/packageScope/DifferentPackageTest.groovy

Are you saying you're expecting the 3 FIXME tests to pass once some kind of 
change is made?  Or that they fail with the proposed changes here?

Created GROOVY-9106


was (Author: emilles):
I see the tests: 
https://github.com/apache/groovy/blob/master/src/test/org/codehaus/groovy/transform/packageScope/DifferentPackageTest.groovy

Are you saying you're expecting the 3 FIXME tests to pass once some kind of 
change is made?  Or that they fail with the proposed changes here?

I'm happy to open another issue for this.  I'm just not quite clear.

> Access to package-scoped static field is forbidden for inner class in static 
> compilation mode
> ---------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-9043
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9043
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 3.0.0-alpha-4, 2.5.6
>            Reporter: Basil Peace
>            Assignee: Paul King
>            Priority: Minor
>             Fix For: 3.0.0-beta-1, 2.5.7
>
>
> Given:
>  
> {code:java}
> import groovy.transform.CompileStatic
> import groovy.transform.PackageScope
> @CompileStatic
> class Test {
>   @PackageScope
>   static final String S = 'Some constant'
>   static class Inner {
>     String method() {
>       S
>     }
>   }
> }
> {code}
> there is a compilation error:
>  
>  
> {noformat}
> Access to Test#S is forbidden @ line -1, column -1.{noformat}
> No error without @CompileStatic.
>  
> Analogous code works in Java



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to