package? :D
I want to call some kotlin functions using the companion as a receiver like:
fun String.Companion.foo()
e
ephemient
03/02/2023, 8:21 PM
it's not a public API, but it can't change without breaking binary compatibility with existing Kotlin libraries, so… somewhat safe?
ephemient
03/02/2023, 8:23 PM
Kotlin functions defined like that aren't designed to be callable from Java though, I'd either change their definition or switch the caller to Kotlin
h
hfhbd
03/02/2023, 8:30 PM
That's true, and yeah, using Kotlin is always nicer. But creating another wrapper in Kotlin is annoying too, and now knowing the companion object its usage is okay.