Open loathwine opened 1 month ago
Found a workaround that is simpler. By using lazy val
instead of val
the order doesn't matter.
lazy val genCoolString: Gen[Any, CoolString] = DeriveGen[CoolString]
val genString = Gen.alphaNumericStringBounded(0, 5).map("Ayyy! " + _)
given DeriveGen[String] = DeriveGen.instance(genString)
One of my generators failed at runtime and it seems to depends on the order of the involved generators.
scastie