Eric Milles created GROOVY-11373:
------------------------------------
Summary: IllegalAccessError writing package-private property of
other-package map-based type
Key: GROOVY-11373
URL: https://issues.apache.org/jira/browse/GROOVY-11373
Project: Groovy
Issue Type: Bug
Affects Versions: 4.0.21, 5.0.0-alpha-8
Reporter: Eric Milles
Assignee: Eric Milles
Consider the following:
{code:java}
package p;
public class C extends java.util.HashMap {
public void setFoo(Object x) {}
protected void setBar(Object x) {}
void setBaz(Object x) {}
private void setBoo(Object x) {}
}
{code}
{code:groovy}
@groovy.transform.CompileStatic
void test(p.C p_c) {
p_c.foo = null // works
p_c.bar = null // SC: Method setBar is protected in p.C
p_c.baz = null // IllegalAccessError
p_c.boo = null // SC: Cannot call private method p.C#setBoo from class ...
}
{code}
GROOVY-11319, GROOVY-11223
--
This message was sent by Atlassian Jira
(v8.20.10#820010)