Bug 1308 : fields in inner classes cannot be static
Last modified: 2009-08-23 11:27




Status:
RESOLVED
Resolution:
WONTFIX -
Priority:
P2
Severity:
normal

 

Reporter:
Professor Calculus
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2009-08-23 11:09
When a field is declared static in an inner class, the following message
appears:
"The field fieldName cannot be declared static; static fields can only be
declared in static or top level types"

the following piece of code generates this error:

class Example {
static boolean a;
}

Version number: 1.0.3
Operating system: Windows Vista
Hardware: Dell Inspiron 1525
Additional Comment #1 From fry 2009-08-23 11:27
That's not a bug. That behavior is inherited from Java.