Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit fixes a bug pointed out by @alexarchambault. When constructing an `A => B` value from `Cogen[A]` and `Gen[B]`, we need to be able to reliably generate a `B` value given a `Seed`. The `doPureApply` method was given the ability to retry -- but unfortunately, it used the same result value (with the same seed) instead of trying a new one, defeating the retry code. This commit fixes that problem. It adds tests to ensure that filtered generators that can also produce real values can be used with Gen.function1. (If a generator can never produce values it will still be a problem.) Fixes typelevel#300.
- Loading branch information