Skip to content

Commit 35af277

Browse files
committed
Make EmptyTuple a Product
1 parent 488fa6e commit 35af277

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@ class Definitions {
13981398
.updated(AnyValClass, ObjectClass)
13991399
.updated(SingletonClass, ObjectClass)
14001400
.updated(TupleClass, ObjectClass)
1401-
.updated(EmptyTupleClass, ObjectClass)
1401+
.updated(EmptyTupleClass, ProductClass)
14021402
.updated(NonEmptyTupleClass, ProductClass)
14031403

14041404
// ----- Initialization ---------------------------------------------------

library/src-bootstrapped/scala/Tuple.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ object Tuple {
192192
}
193193

194194
/** Tuple of arity zero */
195-
sealed trait EmptyTuple extends Tuple
195+
sealed trait EmptyTuple extends Tuple with Product
196196

197197
/** Tuple of arbitrary non-zero arity */
198198
sealed trait NonEmptyTuple extends Tuple with Product {

library/src-bootstrapped/scala/runtime/Tuple0.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ package scala.runtime
22

33
/** A tuple of 0 elements; the canonical representation of a [[scala.Product0]].
44
*/
5-
/*case*/ object Tuple0 /*extends Product0 */ {
5+
case object Tuple0 extends Product0 {
66
override def toString(): String = "()"
77
}

0 commit comments

Comments
 (0)