You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently migrating code from scala 2.13 to Scala 3 and found a weird issue. I am not sure whether this is a bug or not. And also sure whether it should be reported here or on http4s. Opening to be sure:
[error] -- [E172] Type Error: /tmp/quickstart/src/main/scala/com/example/quickstart/Main.scala:12:71
[error] 12 | val middleware = AuthMiddleware(Kleisli { _ => OptionT.pure { "foo" } })
[error] | ^
[error] |No given instance of type cats.Applicative[[_] =>> Any] was found for parameter F of method apply in class PurePartiallyApplied
[error] |
[error] |One of the following imports might make progress towards fixing the problem:
[error] |
[error] | import fs2.Compiler.Target.forConcurrent
[error] | import fs2.Compiler.Target.forSync
[error] |
[error] -- [E172] Type Error: /tmp/quickstart/src/main/scala/com/example/quickstart/Main.scala:12:74
[error] 12 | val middleware = AuthMiddleware(Kleisli { _ => OptionT.pure { "foo" } })
[error] | ^
[error] |No given instance of type cats.Monad[[_] =>> Any] was found for an implicit parameter of method apply in object AuthMiddleware
[error] |
[error] |One of the following imports might make progress towards fixing the problem:
[error] |
[error] | import fs2.Compiler.Target.forConcurrent
[error] | import fs2.Compiler.Target.forSync
[error] |
I am currently migrating code from scala 2.13 to Scala 3 and found a weird issue. I am not sure whether this is a bug or not. And also sure whether it should be reported here or on http4s. Opening to be sure:
The following code compiles under scala 2.13:
But reports compile errors under scala3:
The following variant compiles under scala 3:
The text was updated successfully, but these errors were encountered: