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 2a5f7da commit 2b4e867Copy full SHA for 2b4e867
library/src/scala/deriving/Mirror.scala
@@ -52,10 +52,12 @@ object Mirror {
52
53
extension [T](p: ProductOf[T])
54
/** Create a new instance of type `T` with elements taken from product `a`. */
55
+ @annotation.experimental
56
def fromProductTyped[A <: scala.Product](a: A)(using m: ProductOf[A], ev: p.MirroredElemTypes =:= m.MirroredElemTypes): T =
57
p.fromProduct(a)
58
59
/** Create a new instance of type `T` with elements taken from tuple `t`. */
60
61
def fromTuple(t: p.MirroredElemTypes): T =
62
p.fromProduct(t)
63
}
0 commit comments