Skip to content

Commit

Permalink
Regression test for 19417
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky authored and Kordyjan committed Jan 18, 2024
1 parent d449f0f commit b9857ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/pos/i19417/defs_1.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
trait QueryParamDecoder[E]:
def emap[T](fn: E => Either[Throwable, T]): QueryParamDecoder[T]
object QueryParamDecoder:
def apply[T](implicit ev: QueryParamDecoder[T]): QueryParamDecoder[T] = ev
implicit lazy val stringQueryParamDecoder: QueryParamDecoder[String] = ???
2 changes: 2 additions & 0 deletions tests/pos/i19417/usage_2.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
given[E](using e: EnumOf[E]): QueryParamDecoder[E] = QueryParamDecoder[String].emap(_ => Right(???))
trait EnumOf[E]

0 comments on commit b9857ef

Please sign in to comment.