We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 012d456 commit 3ed582cCopy full SHA for 3ed582c
compiler/src/dotty/tools/dotc/transform/ArrayApply.scala
@@ -52,7 +52,7 @@ class ArrayApply extends MiniPhase {
52
if defn.WrapArrayMethods().contains(wrapArrayMeth.symbol) &&
53
rest.elems.lengthIs < transformListApplyLimit =>
54
rest.elems.foldRight(tpd.ref(defn.NilModule)): (elem, acc) =>
55
- tpd.New(defn.ConsType, List(elem, acc))
+ tpd.New(defn.ConsType, List(elem.ensureConforms(defn.ObjectType), acc))
56
57
case _ =>
58
tree
0 commit comments