From 3ed582c4118201b5c1556378ecde28e8f17a2484 Mon Sep 17 00:00:00 2001 From: Decel Date: Thu, 26 Oct 2023 14:04:28 +0200 Subject: [PATCH] Introduce Boxing for Singletons --- compiler/src/dotty/tools/dotc/transform/ArrayApply.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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