-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
6
-
generic
-
generic
Tried on Solaris JDK build 1.6.0-ea-b38
<Code>
class TestEnum {
static class StaticClazz {
void method() {
class LocalClazz {
enum {MONDAY}
}
}
}
}
</Code>
Output when compiled:
<Output>
java2:/home/rg157576 20 % javac -Xlint TestEnum.java
TestEnum.java:7: enum declarations allowed only in static contexts
enum Days {MONDAY};
^
error: non-static variable this cannot be referenced from a static context
TestEnum.java:7: inner classes cannot have static declarations
enum Days {MONDAY};
</Output>
Here Second error message doesn't contain line Number,Description and error message seems to be wrong.
###@###.### 2005-06-04 10:29:32 GMT
###@###.### 2005-06-06 05:17:05 GMT
<Code>
class TestEnum {
static class StaticClazz {
void method() {
class LocalClazz {
enum {MONDAY}
}
}
}
}
</Code>
Output when compiled:
<Output>
java2:/home/rg157576 20 % javac -Xlint TestEnum.java
TestEnum.java:7: enum declarations allowed only in static contexts
enum Days {MONDAY};
^
error: non-static variable this cannot be referenced from a static context
TestEnum.java:7: inner classes cannot have static declarations
enum Days {MONDAY};
</Output>
Here Second error message doesn't contain line Number,Description and error message seems to be wrong.
###@###.### 2005-06-04 10:29:32 GMT
###@###.### 2005-06-06 05:17:05 GMT