我用idea便利一个floatArray数组,使用if in或者if !in,例如代码:
var e = floatArrayOf(2.1f, 3.5f, 4.2f, 5.8f)
if(2.2f !in e) {
println(“2.2 not exist in variable e”)
}
代码提示in直接变红,然后运行就出现None of the following candidates is applicable because of receiver type mismatch:
有人遇到这个问题吗?
另附控制台打印的错误日志