java.lang.IllegalStateException: Could not locate a primary constructor for kotlin.Array
at io.kotest.property.arbitrary.JvmbindKt.forClassUsingConstructor(jvmbind.kt:84)
at io.kotest.property.arbitrary.TargetDefaultForClassNameKt.targetDefaultForType(targetDefaultForClassName.kt:73)
at io.kotest.property.resolution.JvmArbResolver.resolve(platformArbResolver.kt:11)
at io.kotest.property.resolution.ResolveKt.resolve(resolve.kt:28)
at TestUsingCheckAllWithArray$1$1.invokeSuspend(MyTest.kt:34)
Klitos Kyriacou
10/03/2023, 5:30 PM
There is a workaround:
Copy code
checkAll<List<String>> {
val array = it.toTypedArray()
foo(array) shouldBe ...
}
But it would be nice if it worked with Array directly.