daviddenton / fintrospect

Implement fast, type-safe HTTP webservices for Finagle
http://fintrospect.io
Apache License 2.0
90 stars 10 forks source link

Extractable incorrectly short-circuiting if the last clause in the for comprehension resolves to NotProvided #19

Closed daviddenton closed 8 years ago

daviddenton commented 8 years ago

Example test case:

      val ex = Extractable.mk {
        request: Request => for {
          req <- Query.required.int("req") <--? request
          opt <- Query.optional.int("optional") <--? request
        } yield Some((req, opt))
      }

      ex <--? Request("/?req=123") shouldBe Extracted((Some(123), None))

      Fails with:  NotProvided was not equal to Extracted((Some(123),None)) 
daviddenton commented 8 years ago

Fixed in 12.18.2