Skip to content

Commit

Permalink
Add experimental annotation to new operations
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilquist committed Dec 15, 2021
1 parent 420c8a3 commit c008865
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/src/scala/deriving/Mirror.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ object Mirror {

extension [T](p: ProductOf[T])
/** Create a new instance of type `T` with elements taken from product `a`. */
@annotation.experimental
def fromProductTyped[A <: scala.Product](a: A)(using m: ProductOf[A], ev: p.MirroredElemTypes =:= m.MirroredElemTypes): T =
p.fromProduct(a)

/** Create a new instance of type `T` with elements taken from tuple `t`. */
@annotation.experimental
def fromTuple(t: p.MirroredElemTypes): T =
p.fromProduct(t)
}

0 comments on commit c008865

Please sign in to comment.