We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d449f0f commit b9857efCopy full SHA for b9857ef
tests/pos/i19417/defs_1.scala
@@ -0,0 +1,5 @@
1
+trait QueryParamDecoder[E]:
2
+ def emap[T](fn: E => Either[Throwable, T]): QueryParamDecoder[T]
3
+object QueryParamDecoder:
4
+ def apply[T](implicit ev: QueryParamDecoder[T]): QueryParamDecoder[T] = ev
5
+ implicit lazy val stringQueryParamDecoder: QueryParamDecoder[String] = ???
tests/pos/i19417/usage_2.scala
@@ -0,0 +1,2 @@
+given[E](using e: EnumOf[E]): QueryParamDecoder[E] = QueryParamDecoder[String].emap(_ => Right(???))
+trait EnumOf[E]
0 commit comments