continuations in Scala 2.8.1 and Eclipse

故事扮演 提交于 2019-12-02 00:36:03

问题


How can i start scala (or scalac) with the -P:continuations:enable flag in Eclipse I used import scala.util.continuations._; in my code , and need to enable the plugin.


回答1:


Window -> Preferences -> Scala -> Compiler

add continuations:enable to P input box




回答2:


Window -> Preferences -> Scala -> Compiler -> Standard

add continuations:enable to P input box

Window -> Preferences -> Scala -> Compiler -> Advanced

add lib\continuations.jar to XPlugin

Window -> Preferences -> Scala -> Compiler -> Build Manager sbt




回答3:


You may also need to switch the Eclipse builder used from refined to sbt, see: http://scala-ide-portfolio.assembla.com/spaces/scala-ide/wiki/SBT-based_build_manager

However, there is a known bug with that which may or may not occur, see: http://scala-ide-portfolio.assembla.com/spaces/scala-ide/tickets/1000617-sbt-build-manager-and-certain-compiler-options-don-t-mix (allegedly fixed in latest overnight build).



来源:https://stackoverflow.com/questions/4556540/continuations-in-scala-2-8-1-and-eclipse

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