Scala 2.13.5错误:Value to Double不是任何

5n0oy7gb  于 2022-11-09  发布在  Scala
关注(0)|答案(1)|浏览(107)

下面的代码在2.12.10中运行良好,但在2.13.5中失败,并出现错误:
错误:Value to Double不是任何[Error]数组(Maxval.toDouble)的成员。map(_.toDouble))
代码:

val xyz: Array[Double] = 
  Array(minval.toDouble) ++
  (
    (
      (minval.toDouble until maxval.toDouble by width_).toArray ++                 
      Array(maxval.toDouble)
    ).map(_.toDoubleOption) 
  )
c0vxltue

c0vxltue1#

val xyz: Array[Double] = Array(minval.toDouble) ++
  (((minval.toDouble until maxval.toDouble by 
  width_).toArray.map(_.toDouble) ++
  Array(maxval.toDouble))
)

相关问题