vio
09/28/2020, 12:01 PMobject A {
val a = ...
object B {
val b = ...
}
}
and I'm accessing b like this: A.B.b
(which is what I need)
but I would like to move class B into another file, and still acces b
the same way
and I can't find the right way to define it
I would like to have something like bellow (this is not a valid code):
object A.B {
val b = ...
}
Is there a way to get something similar?
Thank you in advance!andylamax
09/28/2020, 12:06 PM// B.kt
package sample
object B {
val b = . . .
}
//A.kt
import sample.B as ObjB
object A {
val a = . . .
val B = ObjB
}
vio
09/28/2020, 12:12 PM