When a package scoped java class is in the inheritance hierarchy of a scala class, call to super method from scala results in compiler error "Unable to access method aMethod in class AJava with a super reference"
It is easily reproducible using this code:
// AJava.java
package test.java;
abstract class AJava {
protected void aMethod() {
}
}
// BJava.java
package test.java;
public class BJava extends AJava {
}
// CScala.scala
package test.scala
import test.java.BJava
class CScala extends BJava {
protected override def aMethod() {
super.aMethod()
}
}
This is something which works in pure Java, and it also works for pure scala, but not for java/scala mixed code.