John Dior
09/19/2023, 4:50 AMJeff Lockhart
09/19/2023, 5:01 AMexpect class Sith
or interface Sith
wrapper API. Then implement the Sith
class as an actual class
or class
implementing your interface
in the two separate platforms, utilizing libvader and libmaul. If you go the interface
route, you'd inject the platform implementation at runtime.John Dior
09/19/2023, 5:12 AMfun main() {
val f = F("hi")
val g = G("hello")
val q: KProperty1<G, *> = F::p convert g
val r = q.get(g)
}
infix fun <T> KProperty1<*,*>.convert(t: T) = this as KProperty1<T, *>
data class F( val p : String)
data class G( val p : String)