I have the following list defined within a Scala object:
object Foo {
val bar = List(1, 2, 3)
}
Which seems to become a scala.collection.immutable.List<Object> when I try to use it from Java. As a consequence, I have to use getters like Foo.bar().apply$mcII$sp(i) or apply with a cast to Integer/int.
Why is the generic type Object and not Integer? This also seems to be only the case for types that exist as Java primitives; List[MyType] becomes List<MyType> in Scala.
List[MyType]which becomesList<MyType>in Java.