You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (Jira)" <ji...@apache.org> on 2020/11/04 00:08:00 UTC

[jira] [Resolved] (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 ]

Daniel Sun resolved GROOVY-9791.
--------------------------------
    Fix Version/s: 4.0.0-alpha-2
       Resolution: Fixed

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