The groovy compiler used by eclipse & intellij are both having trouble compiling static inner classes. The groovyc compiler does not fail but it appears to generate incorrect bytecode. I filed a issue with intellij and they said that this is a groovy compiler problem not and intellij problem.
The following code triggers the problem:
This is a serious issue because without any tool support we cannot use static inner classes. The only work around for this issue is to not use static inner classes.
Here are the following issues related to this:
I have not looked in detail at the bytecode generated by the groovy compiler but decompiling the class files with JD Decompiler gives the following: