[
https://issues.apache.org/jira/browse/GROOVY-11764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles resolved GROOVY-11764.
----------------------------------
Fix Version/s: 5.0.3
Resolution: Fixed
> super property resolution
> -------------------------
>
> Key: GROOVY-11764
> URL: https://issues.apache.org/jira/browse/GROOVY-11764
> Project: Groovy
> Issue Type: Bug
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Minor
> Fix For: 5.0.3
>
>
> Consider the following:
> {code:groovy}
> package p
> class A {
> public Number getValue() {
> 42
> }
> }
> class B extends A {
> @PackageScope String value = 'xx'
> }
> // not in package p:
> class C extends p.B {
> void test() {
> print(super.value)
> }
> }
> new C().test()
> {code}
> I was expecting this to print "42" since {{C}} does not have access to the
> package-private field {{value}} of {{B}}. However, the script throws an
> {{IllegalAccessError}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)