Eric Milles created GROOVY-11412:
------------------------------------
Summary: SC: outer class field and self dynamic property
Key: GROOVY-11412
URL: https://issues.apache.org/jira/browse/GROOVY-11412
Project: Groovy
Issue Type: Bug
Components: Static compilation
Affects Versions: 5.0.0-alpha-8
Reporter: Eric Milles
Assignee: Eric Milles
The test case described in GROOVY-10985 fails to execute as expected under
static compilation if a single reference to the private outer class field is
introduced.
{code:groovy}
@groovy.transform.CompileStatic
class Outer {
private static int VALUE = 1
static class Inner {
def getProperty(String name) {
if (name == "VALUE") return 2
}
void test() {
if (Outer.VALUE > 0) print 'positive' // creates private access bridge
print VALUE // classgen now targets private access bridge
}
}
}
new Outer.Inner().test()
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)