Skip to content

Commit 08613cb

Browse files
author
Antoine Brunner
committed
Move unit cases to improve performance
1 parent b1977cb commit 08613cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src/scala/runtime/DynamicTuple.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ object DynamicTuple {
2525
}
2626

2727
def dynamicToArray(self: Tuple): Array[Object] = (self: Any) match {
28-
case self: Unit => Array.emptyObjectArray
2928
case self: TupleXXL => self.toArray
3029
case self: Product => productToArray(self)
30+
case self: Unit => Array.emptyObjectArray
3131
}
3232

3333
def dynamicToIArray(self: Tuple): IArray[Object] = (self: Any) match {
34-
case self: Unit => Array.emptyObjectArray.asInstanceOf[IArray[Object]] // TODO use IArray.emptyObjectIArray
3534
case self: TupleXXL => self.elems
3635
case self: Product => productToArray(self).asInstanceOf[IArray[Object]]
36+
case self: Unit => Array.emptyObjectArray.asInstanceOf[IArray[Object]]
3737
}
3838

3939
def productToArray(self: Product): Array[Object] = {

0 commit comments

Comments
 (0)