Also, I ran into another issue where I tried makin...
# kotest
a
Also, I ran into another issue where I tried making my own extension of Free-spec (roughly) like this:
Copy code
abstract class MySpec(
  val variousStuff: VariousStuff,
  body: MySpec.() -> Unit
): FreeSpec(body as Function1<FreeSpec, Unit>) { ... }
It works just fine for JVM but when I try doing a native (e.g. LinuxX64) it produces an invalid entry in
kotest.kt
that looks like this:
Copy code
SpecRef.Function ({ `Test1`() }, `Test1`::class, "my.stuff.Test1"), 
SpecRef.Function ({ `Test2`() }, `Test2`::class, "my.stuff.Test2"), 
SpecRef.Function ({ `MySpec`() }, `MySpec`::class, "my.stuff.MySpec"), 
SpecRef.Function ({ `Test3`() }, `Test3`::class, "my.stuff.Test3"), 
SpecRef.Function ({ `Test4`() }, `Test4`::class, "my.stuff.Test4"),
I worked around it by making
MySpec
a regular (albeit open) class and adding a no-args constructor but it seems like a hack. Maybe the Kotest KSP could be modified to check if the class is abstract and then not add it to this list? I think you could do something like:
Copy code
(type:KSType).declaration.modifiers.contains(Modifier.ABSTRACT)