@@ -36,7 +36,7 @@ object deriving {
36
36
type MirroredType = this .type
37
37
type MirroredElemTypes = EmptyTuple
38
38
type MirroredElemLabels = EmptyTuple
39
- def fromProduct (p : scala.Product ) = this
39
+ def fromProduct (p : scala.Product ): MirroredMonoType = this
40
40
}
41
41
42
42
/** A proxy for Scala 2 singletons, which do not inherit `Singleton` directly */
@@ -45,7 +45,7 @@ object deriving {
45
45
type MirroredType = value.type
46
46
type MirroredElemTypes = EmptyTuple
47
47
type MirroredElemLabels = EmptyTuple
48
- def fromProduct (p : scala.Product ) = value
48
+ def fromProduct (p : scala.Product ): MirroredMonoType = value
49
49
}
50
50
51
51
type Of [T ] = Mirror { type MirroredType = T ; type MirroredMonoType = T ; type MirroredElemTypes <: Tuple }
@@ -57,16 +57,16 @@ object deriving {
57
57
class ArrayProduct (val elems : Array [AnyRef ]) extends Product {
58
58
def this (size : Int ) = this (new Array [AnyRef ](size))
59
59
def canEqual (that : Any ): Boolean = true
60
- def productElement (n : Int ) = elems(n)
61
- def productArity = elems.length
60
+ def productElement (n : Int ): Any = elems(n)
61
+ def productArity : Int = elems.length
62
62
override def productIterator : Iterator [Any ] = elems.iterator
63
- def update (n : Int , x : Any ) = elems(n) = x.asInstanceOf [AnyRef ]
63
+ def update (n : Int , x : Any ): Unit = elems(n) = x.asInstanceOf [AnyRef ]
64
64
}
65
65
66
66
/** The empty product */
67
67
object EmptyProduct extends ArrayProduct (Array .emptyObjectArray)
68
68
69
69
/** Helper method to select a product element */
70
- def productElement [T ](x : Any , idx : Int ) =
70
+ def productElement [T ](x : Any , idx : Int ): T =
71
71
x.asInstanceOf [Product ].productElement(idx).asInstanceOf [T ]
72
72
}
0 commit comments