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

Eric Milles edited comment on GROOVY-11357 at 4/25/24 3:09 PM:
---------------------------------------------------------------

https://github.com/apache/groovy/commit/ccec2c72366c94122d12dd8de26e9f000e1134c6
https://github.com/apache/groovy/commit/3e22ae91eab45b08fae2984a07feea47b126470a


was (Author: emilles):
https://github.com/apache/groovy/commit/ccec2c72366c94122d12dd8de26e9f000e1134c6

> Package-private field and method or property have different treatment
> ---------------------------------------------------------------------
>
>                 Key: GROOVY-11357
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11357
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>              Labels: breaking
>             Fix For: 5.0.0-alpha-9
>
>
> Follow up from GROOVY-11356.  Package-private members produce different 
> results.  Consider the following:
> {code:groovy}
> package p
> import groovy.transform.*
> abstract class A {
>   @PackageScope final foo = 'foo'
>   @PackageScope getBar() { 'bar }
> }
> {code}
> {code:groovy}
> // not package p
> class C extends p.A {
>   void test() {
>     print getBar() // prints "bar"
>     print bar // also prints "bar"
>     print foo // throws MissingPropertyException
>   }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to