Description
The enclosing method is not set for anonymous inner classes. AST transformations may rely on that information (actually, GROOVY-5647 has a workaround for this).
For example:
class A { void enclosingMethod() { Runnable r = new Runnable() { void run() {} } } }
If you inspect the AST, you will see that encoding method for the anonymous runnable is null.