From 2a799121fa5b39d059575e6bd6bdf65d94a0473e Mon Sep 17 00:00:00 2001 From: Vamshi Maskuri <117595548+varshith257@users.noreply.github.com> Date: Wed, 11 Sep 2024 02:54:12 +0530 Subject: [PATCH] fmt --- zio-http/shared/src/main/scala/zio/http/Routes.scala | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zio-http/shared/src/main/scala/zio/http/Routes.scala b/zio-http/shared/src/main/scala/zio/http/Routes.scala index da9a573561..a331d16121 100644 --- a/zio-http/shared/src/main/scala/zio/http/Routes.scala +++ b/zio-http/shared/src/main/scala/zio/http/Routes.scala @@ -107,6 +107,15 @@ final case class Routes[-Env, +Err](routes: Chunk[zio.http.Route[Env, Err]]) { s def handleErrorCauseZIO(f: Cause[Err] => ZIO[Any, Nothing, Response])(implicit trace: Trace): Routes[Env, Nothing] = new Routes(routes.map(_.handleErrorCauseZIO(f))) + def isScala2: Boolean = util.Properties.versionNumberString.startsWith("2.") + + def isIntersectionType[T](implicit tag: Tag[T]): Boolean = { + tag.tag match { + case t if t.toString.contains("with") => true + case _ => false + } + } + /** * Allows the transformation of the Err type through an Effectful program * allowing one to build up Routes in Stages delegates to the Route.