Exerosis
11/13/2020, 11:48 AMdata class First(
val partOfFirst: String
)
data class Second(
val partOfSecond: String
)
fun First.Second.multiExtension() {
println(partOfFirst + partOfSecond)
}
fun main() {
First("hello ").apply {
Second("world").apply {
//possible because First and Second are both in this scope.
multiExtension()
}
}
}
kioba
11/13/2020, 12:12 PM