Eric Milles created GROOVY-11830:
------------------------------------
Summary: IllegalAccessError: interface method and protected super
class method
Key: GROOVY-11830
URL: https://issues.apache.org/jira/browse/GROOVY-11830
Project: Groovy
Issue Type: Bug
Affects Versions: 5.0.3, 4.0.29, 3.0.25
Reporter: Eric Milles
Assignee: Eric Milles
Consider the following:
{code:groovy}
trait A {
abstract def m()
}
class B {
protected def m() { 'b' }
}
class C extends B implements A {
}
print new C().m() // IllegalAccessError
{code}
The trait {{A}} could also be an interface. It specs out a public method.
When a super class provides a protected or package-private method (when in same
package as extending class), there is no compiler error/warning or public
bridge method created to prevent an {{IllegalAccessError}} at runtime.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)