【发布时间】:2019-03-08 13:14:51
【问题描述】:
Scala 世界的新手和练习,在 windows REPL 中的代码行下面执行。得到错误单元不接受参数。对此有任何想法。
scala> :paste
// Entering paste mode (ctrl-D to finish)
val x:Int = 10
println(x)
{
val x:Int =20
println(x)
}
println(x)
// Exiting paste mode, now interpreting.
<pastie>:14: error: Unit does not take parameters
{
^
scala>
【问题讨论】: