LastExceed
05/29/2021, 10:01 PMBig Chungus
05/29/2021, 10:37 PMBig Chungus
05/29/2021, 10:43 PMArkadii Ivanov
05/29/2021, 11:03 PMhfhbd
05/29/2021, 11:05 PMx
is X.INSTANCE
, it could have some kind of a mutable state, but with X.Y
it is clear, Y
is not affected by any changes from x
.
object X {
var s = 42
object Y {
var l = s
}
}
fun foo() {
println(X.Y.l)
val x = X
println(X.Y.l)
x.s = 1
println(X.Y.l)
}
foo()
nkiesel
05/31/2021, 5:17 PMArkadii Ivanov
05/31/2021, 7:04 PM