[ https://issues.apache.org/jira/browse/GROOVY-6825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15047078#comment-15047078 ]
Jason Winnebeck commented on GROOVY-6825: ----------------------------------------- This was reported against Groovy 2.3.1 per the JIRA so it's possible it's no longer an issue for inner classes when using setters. I tested making the field outerProperty private, and I do see the issue, it is exactly the same as what I see in GROOVY-7705, but for closures. When the setter exists, a direct call is made. When there is no setter, setProperty is called, rather than a synthetic method. > Static compiler does not always make direct setter call inside inner class > -------------------------------------------------------------------------- > > Key: GROOVY-6825 > URL: https://issues.apache.org/jira/browse/GROOVY-6825 > Project: Groovy > Issue Type: Bug > Components: Static compilation > Affects Versions: 2.3.1 > Reporter: Cédric Champeau > Assignee: Cédric Champeau > > Similarily to GROOVY-6823, this code doesn't produce a direct setter call. > However, this one is more complex to fix due to the current static > compilation architecture. > {code} > @groovy.transform.CompileStatic > class Outer { > String outerProperty > private class Inner { > String fromInner() { > outerProperty = 'outer' > //uterProperty > } > } > String blah() { > new Inner().fromInner() > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)