Eric Milles created GROOVY-11357:
------------------------------------

             Summary: 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


Follow up from GROOVY-11356.  Package-private members produce different 
results.  Consider the following:
{code:groovy}
package p
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 // prints "bar"
    print foo // throws MissingPropertyException
  }
}



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

Reply via email to