kotest-property / io.kotest.property.arbitrary / filterIsInstance

filterIsInstance

fun <A, reified B : A> Arb<A>.filterIsInstance(): Arb<B>

Create a new Arb by keeping only instances of B generated by this gen. This is useful if you have a type hierarchy and only want to retain a particular subtype.