报告手动构建集合索引的范围,而不是使用 .indices。
.indices
示例:
var x: Seq[Int] Range(0, x.size) 0 until x.size 0.to(x.size - 1)
在应用快速修复后:
var x: Seq[Int] x.indices