Eivind
04/19/2021, 2:16 PMBig Chungus
04/19/2021, 2:18 PMcompanion object
in the class for you to extendephemient
04/19/2021, 2:20 PMEivind
04/19/2021, 2:34 PMsindrenm
04/19/2021, 2:36 PMclass Foo {
companion object
}
fun Foo.Companion.bar() { println("bar") }
fun main() {
Foo.bar()
}
But that, of course, requires that you control the type in question, which might not be your case.Eivind
04/19/2021, 4:31 PMNir
04/19/2021, 11:58 PMEivind
04/20/2021, 10:00 AM