Skip to content

Gen.posNum fails to produce a value, listOfN and other combinators don't handle this #568

@zakpatterson

Description

@zakpatterson

On 1.14.2 and 1.14.1, I get the following:

scala> (1 to 10000).toList.map(_ => Gen.posNum[Int].sample).flatten.length
res99: Int = 9904

scala> (1 to 10000).toList.map(_ => Gen.posNum[Int].sample).flatten.length
res100: Int = 9887

This issue is absent on 1.14.0:

scala> (1 to 10000).toList.map(_ => Gen.posNum[Int].sample).flatten.length
res1: Int = 10000

scala> (1 to 10000).toList.map(_ => Gen.posNum[Int].sample).flatten.length
res2: Int = 10000

This might be related to #567

1.14.1 failing build
1.14.2 failing build
My project's version pr
My use case

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions