How do I access Java enums from Scala?

Viewed 3837

My java class is as follows

public class Test {

    protected enum TestEnum {A, B, C};

    public Test(TestEnum te) {

    }

}

here is my Scala

class ScalaEnum(myEnum: TestEnum) extends Test(myEnum) {

}

I receive the following error message

class TestEnum in object Test cannot be accessed in object Test Access to protected class TestEnum not permitted because enclosing class class ScalaEnum in package XXX is not a subclass of object Test in package YYY where target is defined

2 Answers
Related