Why would a Scala Worksheet using Scala-IDE give this as an error?

穿精又带淫゛_ 提交于 2019-12-10 23:55:44

问题


In a Scala worksheet I can do this:

object Play {

 println("Playing a bit")                         //> Playing a bit

 case class X(a: Int = 1, x: List[X]){
 }

}

but I can't do this:

object Play {

 case class X(a: Int = 1, x: List[X]){
 }

}

In the latter it will complain after the case class that ; was expected but import found


回答1:


This seems to be a bug that is fixed in the latest nightly build of Scala IDE. See https://stackoverflow.com/a/12767214/770361



来源:https://stackoverflow.com/questions/12615964/why-would-a-scala-worksheet-using-scala-ide-give-this-as-an-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!