TestEnum.java
package tests;
public class TestEnum {
public void main(String[] args) {
B.values()[0].doNasty();
}
interface A {
void doNasty();
}
enum B implements A {
C {
public void doNasty() {}
};
}
}
Linux, OpenJDK Runtime Environment (IcedTea6 1.11.3) (6b24-1.11.3-1ubuntu0.11.10.1)
$ pwd
/home/aemaeth/vm_shared/tests/src/tests
$ javac TestEnum.java
$ Windows, Java(TM) SE Runtime Environment (build 1.6.0_32-b05)
Z:\vm_shared\tests\src\tests>"c:\Program Files\Java\jdk1.6.0_32\bin\javac.exe" TestEnum.java
TestEnum.java:5: cannot find symbol
symbol : method doNasty()
location: class tests.TestEnum.B
B.values()[0].doNasty();
^
1 error
Что я где пропустил?