Skip to content

Commit ca7bd7d

Browse files
Deceldwijnand
authored andcommitted
Introduce Boxing for Singletons
1 parent aaf9ec7 commit ca7bd7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/ArrayApply.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ArrayApply extends MiniPhase {
5252
if defn.WrapArrayMethods().contains(wrapArrayMeth.symbol) &&
5353
rest.elems.lengthIs < transformListApplyLimit =>
5454
rest.elems.foldRight(tpd.ref(defn.NilModule)): (elem, acc) =>
55-
tpd.New(defn.ConsType, List(elem, acc))
55+
tpd.New(defn.ConsType, List(elem.ensureConforms(defn.ObjectType), acc))
5656

5757
case _ =>
5858
tree

0 commit comments

Comments
 (0)