Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.1.1Release, 2.1.2Release
-
Fix Version/s: 2.1.2Release
-
Component/s: None
-
Labels:None
-
Environment:STS 2.5.1.RELEASE w/ GRECLIPSE 2.1.2.xx-20101222-1200-e36
-
Number of attachments :
Description
If an outer class has a static modifier eclipse displays "Illegal modifier for the class". An example file is attached. The full error is displayed below:
Illegal modifier for the class Bug; only public, abstract & final are permitted PublicClass.groovy /groovy-privclassbug/src/bug line 7 Java Problem
Activity
Andy Clement
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Andy Clement [ aclement ] |
Andy Clement
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 2.1.2Release [ 16995 ] | |
| Resolution | Fixed [ 1 ] |
Ok... I've made us 'compatible' with groovy. I'm not sure what groovyc is supposed to be doing with a static outer class but from what I can see it does nothing special. The compiled class is identical to one compiled without specifying static, it doesn't stop me writing a constructor in the type. It feels like it is something they forgot to police when adding inner type support to groovy - and are just discarding the static modifier.
In case I'm missing something, can I ask what you are expecting to be different when you make your outer class static?