Skip to content
New issue

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

Show up "Expected token ARROW but got Token(RBRACKET,],3116,])" when using EitherT.leftT[IO,()] #362

Open
ChunChiehHuang18 opened this issue Sep 21, 2020 · 0 comments

Comments

@ChunChiehHuang18
Copy link

Failed at .getOrElse(EitherT.leftT[IO, ()](SomeError("failed to call method")))

Failed case:

foo match {
      case Right(value) => {
        bar
          .someMethod(value)
          .headOption
          .getOrElse(EitherT.leftT[IO, ()](SomeError("failed to call method")))
      }
      ...
    }

I found out it can pass when workaround with changing () to Unit
.getOrElse(EitherT.leftT[IO, Unit](SomeError("failed to call method")))

Pass case:

foo match {
      case Right(value) => {
        bar
          .someMethod(value)
          .headOption
          .getOrElse(EitherT.leftT[IO, Unit](SomeError("failed to call method")))
      }
      ...
    }
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

No branches or pull requests

1 participant