Victor Cardona
06/10/2021, 11:54 AMclass A {
fun doSomething(): Unit {
...
}
private val B.things: List<Thing>
get() = ...
private fun C.helpMe(): Thing { ... }
}
I currently have the extensions at the top-level, but from reading the guidance it sounds like I should move them into the class itself.Roukanken
06/10/2021, 1:37 PMwith (A()) {
C().helpMe()
}
eg, instance of A
has to be one of this
-es, and instance of C
either in this
-es or before dot
which, while sometimes useful, is usually not what you want, and notably it's different from extension methods being on top-levelVictor Cardona
06/10/2021, 2:06 PM