Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.7.5
-
None
-
None
Description
I'm not sure what is supposed to happen here - you might just need to clarify what it means and close it....
If I write this
static class C { }
groovyc will compile it. It will produce (as far as I can tell) a classfile identical to:
class C {
}
Does static have some special meaning? Maybe it should be getting policed? I imagine static has only been supported in that position since inner type support was added. Doing the same thing in Java shows:
C.java:1: modifier static not allowed here static class C { ^ 1 error
I could imagine static might have forced singleton behaviour in some way but it doesn't - the generated class still has a constructor, I can write my own constructor, etc.