https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
r

russhwolf

07/18/2019, 4:47 PM
If I understand correctly, https://youtrack.jetbrains.com/issue/KT-20427 would let you do what you want
l

LeoColman

07/18/2019, 4:49 PM
I have that stared for a while xD
It is likely the solution
r

russhwolf

07/18/2019, 4:54 PM
Depending on your structure here might be a clever workaround you can find. eg you might be able to mark your default implementation
open
and override it in JVM.
l

LeoColman

07/18/2019, 4:57 PM
But it couldn't be used as "use this impl or the specific from jvm"
I wanted to create methods that support every platform without having to declare all platforms IE no native sourceSet
r

russhwolf

07/18/2019, 5:02 PM
Yeah I don't know exactly what will work for your use-case off-hand, I'm just saying sometimes it's possible to come up with sometihng
Another tactic is to use interfaces instead of expect/actual. That can help make that sort of thing more flexible, at the cost of needing to do the dependency injection more manually