-1
Bug below filed and fixed: https://issues.apache.org/jira/browse/GROOVY-11044 groovy-4.0.12.jar!META-INF/services/org.codehaus.groovy.transform.ASTTransformation is blank, which breaks @Grab annotations From: Milles, Eric (TR Technology) via dev <dev@groovy.apache.org> Sent: Thursday, May 4, 2023 12:29 PM To: dev@groovy.apache.org Subject: RE: [EXT] [VOTE] Release Apache Groovy 4.0.12 There is one regression caused by the change for GROOVY-11029. I am testing a fix. The workaround is to remove static compilation or to write "other = 'value'" as "it.other = 'value'" so the "owner.delegate" gets applied properly. class Bar { @groovy.beans.Bindable String baz String other } class Foo { Bar bar @groovy.beans.Bindable String foo @groovy.transform.CompileStatic void postConstruct() { bar = new Bar() bar.with { addPropertyChangeListener('baz') { event -> other = 'value' // ClassCastException: class Foo cannot be cast to class Bar print 'changed' } } print 'ready;' } } Foo foo = new Foo() foo.postConstruct() foo.getBar().setBaz('xxx') https://github.com/groovy/groovy-eclipse/issues/1412<https://urldefense.com/v3/__https:/github.com/groovy/groovy-eclipse/issues/1412__;!!GFN0sa3rsbfR8OLyAw!bglCVldficTJZuJhLcm5zqHpJi7Sb9VKB4ZClb6GQr_eF4zZ6gMW2Y8gmsHGuhjX5myl5xawpmxlv7D4gvsAW2Ol$>