rad
03/31/2025, 2:11 PMimport 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 ehYoussef Shoaib [MOD]
03/31/2025, 2:29 PMimport Test.get
object Test {
fun get() = "hello"
}
private fun get() = get()
I agree it's a little strange, but perhaps it makes sense?rad
03/31/2025, 2:30 PMTest
interface is a service and the companion is delegated to a service provider, but it feels very weird to actually read