Skip to content

Commit

Permalink
Resolve compilation issues (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvelimir authored Apr 24, 2023
1 parent 1146c3e commit 5b0a54c
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ lazy val example =
.settings(stdSettings("example"))
.settings(scalacOptions += "-language:higherKinds")
.settings(
crossScalaVersions -= Scala3,
publish / skip := true,
crossScalaVersions := List(Scala213),
publish / skip := true,
libraryDependencies ++= List(
"dev.zio" %% "zio" % "2.0.13",
"dev.zio" %% "zio-config" % "3.0.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ trait IndexNameNewtype {
}
}
}
type IndexName = IndexName.Type
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ trait RoutingNewtype {
object Routing extends Newtype[String] {
override def assertion = assert(!isEmptyString) // scalafix:ok
}
type Routing = Routing.Type
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ trait IndexNameNewtype {
protected inline def validateInline(inline name: String) =
${ IndexNameValidator.validateInlineImpl('name) }
}
type IndexName = IndexName.Type
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ trait RoutingNewtype {
object Routing extends Newtype[String] {
override inline def assertion = !isEmptyString // scalafix:ok
}
type Routing = Routing.Type
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ import zio.prelude.Newtype
import zio.schema.Schema

package object elasticsearch extends IndexNameNewtype with RoutingNewtype {
type IndexName = IndexName.Type

type Routing = Routing.Type

object DocumentId extends Newtype[String]
type DocumentId = DocumentId.Type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ package zio.elasticsearch.utils
import zio.prelude.{Newtype, NewtypeCustom}

abstract class UnsafeWrapUtil {
def unsafeWrap[A, T <: Newtype[A]](value: A)(newtype: T): newtype.Type = newtype.wrap(value)

def unsafeWrap[A, T <: NewtypeCustom[A]](value: A)(newtype: T): newtype.Type = newtype.wrap(value)
def unsafeWrap[A, T <: Newtype[A] | NewtypeCustom[A]](value: A)(newtype: T): newtype.Type = newtype.wrap(value)
}

0 comments on commit 5b0a54c

Please sign in to comment.