Skip to content

Commit 136dcc4

Browse files
committed
address review comments
1 parent 2ff227b commit 136dcc4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

library/src/scala/runtime/TupleMirror.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ package scala.runtime
44
* as we do not need to synthesize an anonymous Mirror class at every callsite.
55
*/
66
final class TupleMirror(arity: Int) extends scala.deriving.Mirror.Product with Serializable:
7-
assert(arity > 0) // EmptyTuple is not a valid `MirroredType` for TupleMirror
8-
9-
override type MirroredMonoType <: NonEmptyTuple
10-
7+
assert(arity >= 0) // technically could be used for EmptyTuple also, but it has its own singleton mirror.
118
final def fromProduct(product: Product): MirroredMonoType =
129
if product.productArity != arity then
1310
throw IllegalArgumentException(s"expected Product with $arity elements, got ${product.productArity}")

0 commit comments

Comments
 (0)