根据官方文档KotlinLang,将可空数字引用(例如Int?)装箱。
boxedA ===当且仅当boxedA和anotherBoxedA指向同一个对象时,anotherBoxedA的计算结果为true
val a: Int = 10000
println(a === a) // Prints 'true'
val boxedA: Int? = a
val anotherBoxedA: Int? = a
println(boxedA === anotherBoxedA) // !!!Prints 'false'!!!
但是,如果我仅将a的值更改为80,则参照相等性变为真!!
val a: Int = 80
println(a === a) // Prints 'true'
val boxedA: Int? = a
val anotherBoxedA: Int? = a
println(boxedA === anotherBoxedA) // !!!Prints 'true'!!!
仅凭价值变化怎么能有不同的指向?