DerivedGen encodes an assumption that the sieve for each GenResult from
a Gen will always be the same. It captures a single sieve for a Gen and
then applies it blindly to subsequent samples.
This interacts poorly with OneGenOf, which can easily emit GenResults
that have different sieves, because they originate from different
generators.
This commit fixes all that: DerivedGen only uses the sieve that came
with a GenResult; it doesn't save an earlier sieve for use later. It
adds a test TestDeriveGenVaryingSieve to capture this use case.
DerivedGen encodes an assumption that the sieve for each GenResult from a Gen will always be the same. It captures a single sieve for a Gen and then applies it blindly to subsequent samples.
This interacts poorly with OneGenOf, which can easily emit GenResults that have different sieves, because they originate from different generators.
This commit fixes all that: DerivedGen only uses the sieve that came with a GenResult; it doesn't save an earlier sieve for use later. It adds a test TestDeriveGenVaryingSieve to capture this use case.