Eric Milles created GROOVY-9791:
-----------------------------------
Summary: SC: cross-package protected field access uses dynamic
property methods
Key: GROOVY-9791
URL: https://issues.apache.org/jira/browse/GROOVY-9791
Project: Groovy
Issue Type: Bug
Affects Versions: 3.0.6, 2.5.13, 4.0.0-alpha-1
Reporter: Eric Milles
Consider the following:
{code:groovy}
package p
class A {
protected int x
}
{code}
{code:groovy}
package q
@groovy.transform.CompileStatic
class B extends A {
int m() { return x }
}
{code}
In this case (or if {{x}} is static), the compiler writes calls to dynamic
property methods. This should be a direct field read.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)