We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wart remover detects an Any Type where it should not when using traverse from cats on eithers.
Here's a minimal example:
import cats.implicits._ val b: List[Either[String, Int]] = List("failed".asLeft[Int], 2.asRight[String]) val c: Either[String, List[Int]] = b.sequence
gives
[wartremover:Any] Inferred type containing Any [error] val c: Either[String, List[Int]] = b.sequence [error] ^
I'm using Scala 2.12.8 and wartremover 2.4.2.
The text was updated successfully, but these errors were encountered:
Any
Hi @olafmaurer. I had this same problem and I have solved it in this way:
import cats.implicits._ val b: List[Either[String, Int]] = List("failed".asLeft[Int], 2.asRight[String]) val c: Either[String, List[Int]] = b.sequence.sequence[({ type G[X] = EitherT[Future, ServiceError, X] })#G, TaxCredentials]
or you can create a type for EitherT[Future, ServiceError, A]:
EitherT[Future, ServiceError, A]
import cats.implicits._ type Consequence[A] = EitherT[Future, ServiceError, A] val b: List[Either[String, Int]] = List("failed".asLeft[Int], 2.asRight[String]) val c: Either[String, List[Int]] = b.sequence.sequence[Consequence, TaxCredentials]
Sorry, something went wrong.
No branches or pull requests
Wart remover detects an Any Type where it should not when using traverse from cats on eithers.
Here's a minimal example:
gives
I'm using Scala 2.12.8 and wartremover 2.4.2.
The text was updated successfully, but these errors were encountered: