EXTRA RELEVANT SYSTEM CONFIGURATION :
javac 1.8.0_121
The issue was present at least as far back as javac 1.8.0_60.

A DESCRIPTION OF THE PROBLEM :
On the included source code, javac reports a compilation error. This error does not occur if any of the following modifications are made:
1. The code is compiled with the Eclipse java compiler instead of javac.
2. The switch statement is replaced with an explicit call to C.values() or arg.ordinal().
3. The enum C is moved to be inside the top-level class A instead of inside the inner class B.
4. The enum C is changed from protected to public.

As far as I can tell, this error should not occur according to the Java language spec.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a source file in the directory "foo" named "A.java" with the corresponding contents from the source code section.
2. Create a source file in the directory "bar" named "D.java" with the corresponding contents from the source code section.
3. Run "javac foo\A.java bar\D.java".