https://kotlinlang.org logo
Title
p

poohbar

10/22/2020, 11:19 PM
I am trying to do something like
MockkKt.mockk()
but the
mockk()
function does not exist 🤔
e

ephemient

10/23/2020, 7:02 AM
because it's
inline fun <reified T> mockk()
, it can only be called from Kotlin
l

Lukas K-G

10/23/2020, 7:28 AM
You could build a wrapper that is accessible from Java.
e

ephemient

10/23/2020, 7:50 AM
there's no way to pass a
<reified T>
type parameter from Java though
l

Lukas K-G

10/23/2020, 10:07 AM
You would have to pass the type in Koltin, true. Just works for very limited use cases and does not scale. 👍
p

poohbar

10/23/2020, 2:13 PM
oh dang.. I guess I will have to write this class in Kotlin
o well
¯\_(ツ)_/¯