```import Test.Companion.get private interface Te...
# getting-started
r
Copy code
import Test.Companion.get

private interface Test {
  fun get(): String

  companion object : Test {
    override fun get(): String {
      return "hello"
    }
  }
}

private fun get(): String {
  return get()
}
I'm wondering whether this is intended behaviour, this compiles perfectly fine (without a runtime stack overflow) but will probably lead to a lot of confusion when actually reading the code. Probably a stupid question but eh
y
Can be simplified to:
Copy code
import Test.get

object Test {
	fun get() = "hello"
}

private fun get() = get()
I agree it's a little strange, but perhaps it makes sense?
r
In my case my
Test
interface is a service and the companion is delegated to a service provider, but it feels very weird to actually read