Skip to content

Commit 872a20e

Browse files
committed
Evaluate creation of array only once
1 parent 3d9b5d1 commit 872a20e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src-scala3/scala/StagedTuple.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ object StagedTuple {
3030

3131
def fromArrayStaged[T <: Tuple : Type](xs: Expr[Array[Object]], size: Option[Int]): Expr[T] = {
3232
if (!specialize) '(dynamicFromArray[T](~xs))
33-
else {
33+
else xs.bind { xs =>
3434
val tup: Expr[Any] = size match {
3535
case Some(0) => '()
3636
case Some(1) => '(Tuple1( (~xs)(0)))

0 commit comments

Comments
 (0)