kotlin Smart cast to ‘Int‘ is impossible, because ‘xxx‘ is a mutable property
kotlin Smartcastto'Int'isimpossible,because'xxx'isamutablepropertythatcouldhavebeenchangedbythistime
var xxx:Int?=null
声明了一个可能为空的整数xxx,这里的?号是将整数自动装箱为对象
当需要用到这个变量时,比如 xxx+5就会报这...
原创
2019-10-17 16:42:43 ·
2427 阅读 ·
0 评论