Skip to content

Commit 3ed582c

Browse files
authored
Introduce Boxing for Singletons
1 parent 012d456 commit 3ed582c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
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)