Eric Milles created GROOVY-11358:
------------------------------------

             Summary: STC: error for abstract class private or package-private 
field access
                 Key: GROOVY-11358
                 URL: https://issues.apache.org/jira/browse/GROOVY-11358
             Project: Groovy
          Issue Type: Bug
          Components: Static Type Checker
            Reporter: Eric Milles
            Assignee: Eric Milles


Consider the following:

{code:groovy}
abstract class A {
  private priv
  @PackageScope pack
}
@TypeChecked
void test (A a) {
  a.@priv
  a.@pack
  a.priv
  a.pack
}
{code}

Access to "priv" and "pack" outside of {{A}} will always fail, since it is 
abstract and so a subclass instance is required.



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

Reply via email to