Skip to content

VoidError - can be applied to any yield type - #4388

Closed
diesalbla wants to merge 1 commit into
typelevel:mainfrom
diesalbla:patch-1
Closed

VoidError - can be applied to any yield type#4388
diesalbla wants to merge 1 commit into
typelevel:mainfrom
diesalbla:patch-1

Conversation

@diesalbla

Copy link
Copy Markdown
Contributor

No description provided.

* @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)

@diesalbla diesalbla closed this Feb 2, 2023
@diesalbla
diesalbla deleted the patch-1 branch June 20, 2023 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants