Closed
Description
We want the same optimization done in #6821 for IArray.apply
.
The idea is to use inlining to trigger the other optimization. The code should be rewritten to
object IArray {
def apply[T](xs: =>T*) given (ct: =>ClassTag[T]): IArray[T] = Array(xs: _*)
def apply(x: =>Boolean, =>xs: Boolean*): IArray[Boolean] = Array(x, xs: _*)
def apply(x: =>Byte, =>xs: Byte*): IArray[Byte] = Array(x, xs: _*)
def apply(x: =>Short, xs: =>Short*): IArray[Short] = Array(x, xs: _*)
...
}