Skip to content

Commit b9857ef

Browse files
oderskyKordyjan
authored andcommitted
Regression test for 19417
1 parent d449f0f commit b9857ef

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/pos/i19417/defs_1.scala

+5
Original file line numberDiff line numberDiff line change
@@ -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

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
given[E](using e: EnumOf[E]): QueryParamDecoder[E] = QueryParamDecoder[String].emap(_ => Right(???))
2+
trait EnumOf[E]

0 commit comments

Comments
 (0)