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

False positive unreachable code warning in http4s-dsl #11457

rossabaker opened this Issue Mar 29, 2019 · 0 comments


None yet
2 participants
Copy link

commented Mar 29, 2019

I will minimize this after Typelevel Summit, but filing a placeholder now.

  • Scala version: 2.13.0-M5
  • Java version: 1.8.0_151

In this snippet, the Ok(req.body) is falsely flagged as unreachable code.

  val testService = HttpRoutes.of[IO] {
    case GET -> Root / "request" =>
      Ok("request response")
    case req @ POST -> Root / "post" =>

We have many similar warnings in the tests using this DSL. No warning is generated in Scala 2.12.8 or 2.11.12.

First spotted in http4s/http4s#2393.

@hrhino hrhino added this to the Backlog milestone Mar 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.