./src/dotty/runtime/Arrays.scala:18: error: Ambiguous overload. The overloaded alternatives of method newInstance in object Array$ with types
(x$0: Class[_], x$1: Int)Object
(x$0: Class[_], x$1: Int*)Object
both match arguments (Class[_](clazz), => Int(xs.length))
val arr = java.lang.reflect.Array.newInstance(clazz, xs.length).asInstanceOf[Array[T]]