[ https://issues.apache.org/jira/browse/GROOVY-11567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-11567. ------------------------------ > Field transform does not handle closure or anonymous class in assert, return, > etc. > ---------------------------------------------------------------------------------- > > Key: GROOVY-11567 > URL: https://issues.apache.org/jira/browse/GROOVY-11567 > Project: Groovy > Issue Type: Bug > Reporter: Eric Milles > Assignee: Eric Milles > Priority: Minor > Fix For: 5.0.0-beta-1 > > > Consider the following: > {code:groovy} > @Field String foo = 'bar' > assert({ -> > new Object() { > String toString() { foo + 'baz' } > } > }.call().toString() == 'barbaz') > {code} > Not the best example, but this fails with an NPE in the compiler. The > {{@Field}} transform navigates expression statements, but not other statement > types. -- This message was sent by Atlassian Jira (v8.20.10#820010)