2

以下代码导致此编译时错误:Missing closing brace } assumed here

该对象在名为 'Currying' 的 Scala 工作表中定义。我认为代码是正确的?

object Currying {

      def add(x:Int, y:Int) = x + y

    add(1, 2)  // 3
} //compile error is here
4

1 回答 1

2

我只是注意到当我删除评论'// 3'时它可以工作,可能是工作表错误

于 2013-07-10T17:02:59.700 回答