I have an enum with a nested enum (which I want to make private), but when I do so GWT tells me that the nested enum is not visible and throws an exception.

public enum OuterEnum {
    A(NestedEnum.X),
    B(NestedEnum.Y),
    C(NestedEnum.X);

    NestedEnum nestedValue;
    private OuterEnum(NestedEnum nv) { nestedValue = nv; }

    private enum NestedEnum {
        X, Y;
    }
}

If I remove the private modifier from the nested enum then the code works. Why does GWT not allow the private modifier for nested enums? Is there a workaround?

Edit
Report