diff --git a/compiler/src/dotty/tools/dotc/transform/ArrayApply.scala b/compiler/src/dotty/tools/dotc/transform/ArrayApply.scala index 5aa23b233bbb..652959b83227 100644 --- a/compiler/src/dotty/tools/dotc/transform/ArrayApply.scala +++ b/compiler/src/dotty/tools/dotc/transform/ArrayApply.scala @@ -52,7 +52,7 @@ class ArrayApply extends MiniPhase { if defn.WrapArrayMethods().contains(wrapArrayMeth.symbol) && rest.elems.lengthIs < transformListApplyLimit => rest.elems.foldRight(tpd.ref(defn.NilModule)): (elem, acc) => - tpd.New(defn.ConsType, List(elem, acc)) + tpd.New(defn.ConsType, List(elem.ensureConforms(defn.ObjectType), acc)) case _ => tree