Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/ApplicativeError.scala
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ trait ApplicativeError[F[_], E] extends Applicative[F] {
* @see [[handleError]] to map to an `A` value instead of `Unit`.
* @see [[https://github.com/typelevel/cats-effect/issues/3152 cats-effect#3152]]
*/
def voidError(fu: F[Unit]): F[Unit] = handleError(fu)(Function.const(()))
def voidError(fu: F[_]): F[Unit] = handleError(fu)(Function.const(()))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is correct. You can get runtime cast errors. See a similar situation in:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, there was a discussion about it in the initial PR:
#4324 (comment)


/**
* Handle errors by turning them into [[scala.util.Either]] values.
Expand Down