斯卡拉表达式
.3.+(5)
5.3
正如我所料,在 Ammonite-REPL 中计算结果为。但是,在 Scala REPL 中,它会产生语法错误,打印
scala> .3.+(5)
<console>:1: error: ';' expected but double literal found.
$intp.3.+(5)
^
直觉上,.3.+(5)
这对我来说似乎是一个有效的表达方式。Ammonite 中有错误还是 Scala REPL 中有错误?