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 Jan 25, 2022
1 parent 2a5f7da commit 2b4e867
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 2b4e867

Please sign in to comment.