这个键插入后必须一直可以查到。请找出错误。
kotlin
data class AccountKey(var email: String)
fun main() {
val key = AccountKey("[email protected]")
val owners = mutableMapOf(key to "Ada")
key.email = "[email protected]"
println(owners[key])
}
data class AccountKey(var email: String)
fun main() {
val key = AccountKey("[email protected]")
val owners = mutableMapOf(key to "Ada")
key.email = "[email protected]"
println(owners[key])
}