We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ff227b commit 136dcc4Copy full SHA for 136dcc4
library/src/scala/runtime/TupleMirror.scala
@@ -4,10 +4,7 @@ package scala.runtime
4
* as we do not need to synthesize an anonymous Mirror class at every callsite.
5
*/
6
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
+ assert(arity >= 0) // technically could be used for EmptyTuple also, but it has its own singleton mirror.
11
final def fromProduct(product: Product): MirroredMonoType =
12
if product.productArity != arity then
13
throw IllegalArgumentException(s"expected Product with $arity elements, got ${product.productArity}")
0 commit comments