[
https://issues.apache.org/jira/browse/GROOVY-11764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18040696#comment-18040696
]
ASF GitHub Bot commented on GROOVY-11764:
-----------------------------------------
eric-milles opened a new pull request, #2342:
URL: https://github.com/apache/groovy/pull/2342
(no comment)
> 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
>
> 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)