Closed
Description
Compiler version
3.6.3
Minimized code
trait Foo:
type A[T]
var arr: Array[A[Int]] = null
class Bar() extends Foo:
type A[T] = Int
object Main:
def main(args: Array[String]) =
val bar = new Bar()
bar.arr = Array.ofDim[Int](1)
bar.arr(0) = 123
Output
Exception in thread "main" java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [I ([Ljava.lang.Object; and [I are in module java.base of loader 'bootstrap')
Expectation
It should run without crashing