Skip to content

Commit

Permalink
Making ClassTagWrapper public to solve issue #1253
Browse files Browse the repository at this point in the history
#1253

Solves:

#1253

(Error message: "object ClassTagWrapper in object Newtype cannot be
accessed as a member of object zio.prelude.Newtype" when attempting
to use a ClassTag on a Newtype or Subtype.)
  • Loading branch information
tim-2022 committed Apr 12, 2024
1 parent 2b3f6f1 commit 506b615
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/shared/src/main/scala-2/zio/prelude/Newtype.scala
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,11 @@ object Newtype {
value.asInstanceOf[F[T#Type]]
}

private trait ClassTagWrapper[-A] {
trait ClassTagWrapper[-A] {
def classTag: ClassTag[_]
}

private object ClassTagWrapper {
object ClassTagWrapper {
def apply[A](implicit ev: ClassTagWrapper[A]): ClassTagWrapper[A] = ev

implicit def classTagWrapperForNewtype[A](implicit underlying: ClassTag[A]): ClassTagWrapper[Newtype[A]] =
Expand Down

0 comments on commit 506b615

Please sign in to comment.