The scala version I use is 3.6.2 with vscode, where the metals info
Version: 1.49.0
Last Updated: 2025-04-11, 09:47:18
The problem I encounter - when editing with following code, IDE and sbt compile throw an error not found: type *
. Switching to OptionT[F, _]
, the vscode highlights OptionT[F, _] with the message complaining Type argument cats.data.OptionT[F, ?] does not have the same kind as its bound [_$1]
.
implicit def http4sKleisliHttpRoutesSyntax[F[_]: Functor, A](
response: Kleisli[OptionT[F, *], A, Response[F]] // <-- error highlighted under *
): KleisliResponseOps[F, A] =
new KleisliResponseOps[F, A](response)
final class KleisliResponseOps[F[_]: Functor, A](
self: Kleisli[OptionT[F, *], A, Response[F]] // <-- error highlighted under *
) { ... }
I checked scala doc. It looks like _ is the right syntax for type parameter, at least for scala 3.3. Does it apply to scala 3.3 onward?
In Scala 3.3,
*
is removed again, and all type parameter placeholders will be expressed with_
.
Additionally, there is a thread in forum similar to my problem, but it is still different. So I do not know how to fix this error. Any advice? Thanks.