You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2020/12/07 22:10:04 UTC
[jira] [Closed] (GROOVY-9791) SC: cross-package protected field
access uses dynamic property methods
[ https://issues.apache.org/jira/browse/GROOVY-9791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-9791.
-----------------------------
> 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: 4.0.0-alpha-1, 2.5.13, 3.0.6
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Fix For: 3.0.7, 4.0.0-alpha-2
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> 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)