Skip to content

Commit

Permalink
🚨 Fixed some inference for scala 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
misherpal committed Jul 3, 2024
1 parent db18338 commit 05a7977
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions url-dsl/src/main/scala/urldsl/language/QueryParameters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ trait QueryParameters[Q, +A] extends UrlPart[Q, A] {
* should that change?
*
* @example
* {{{ param[Int]("age").filter(_ >= 0, (params: Map[String, Param]) => someError(params)) }}}
* {{{param[Int]("age").filter(_ >= 0, (params: Map[String, Param]) => someError(params))}}}
*
* @param predicate
* the additional predicate that the output must satisfy
Expand Down Expand Up @@ -201,7 +201,7 @@ object QueryParameters {
case Param(Nil) => Left(paramMatchingError.missingParameterError(paramName))
case Param(head :: _) => fromString(head)
},
q => Param(List(printer(q)))
(q: Q) => Param(List(printer(q)))
)

final def listParam[Q, A](
Expand All @@ -226,9 +226,9 @@ object QueryParameters {
}
.map(_.reverse)
},
q => Param(q.map(printer.apply)),
(q: List[Q]) => Param(q.map(printer.apply)),
// If `paramName` is not present in the parameters we should return an empty list.
onParameterNotFound = params => Right(ParamMatchOutput(Nil, params))
onParameterNotFound = (params: Map[String, Param]) => Right(ParamMatchOutput(List.empty[Q], params))
)

final lazy val dummyErrorImpl = QueryParametersImpl[DummyError]
Expand Down

0 comments on commit 05a7977

Please sign in to comment.