vngantk
12/23/2022, 10:11 PMPHondogo
12/24/2022, 8:14 AMfun test(ref v: Int) {
++v
}
var x = 1
test(x)
println(x) // 2
PHondogo
12/24/2022, 8:17 AMfun test(ref v: Any?) {
v = Test()
}
var x: Any? = null
test(x)
// x points to created in test object of class Test
PHondogo
12/24/2022, 4:53 PMtest(ref x)