Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Intellij Idea Scala工作表正向参考_Scala_Intellij Idea - Fatal编程技术网

Intellij Idea Scala工作表正向参考

Intellij Idea Scala工作表正向参考,scala,intellij-idea,Scala,Intellij Idea,有一个scala工作表的示例,它在Eclipse中编译和执行,但在Intellij Idea中不编译(版本12.0.6,带有scala插件0.22.302) Idea的问题在于,nodeSum是在使用之后定义的 > <console>:13: error: not found: value nodeSum case n: Node => nodeSum(n) :13:错误:找不到:值nodeSum 案例n:Node=>nodeSum(n) 这是正确的行为吗?我知道

有一个scala工作表的示例,它在Eclipse中编译和执行,但在Intellij Idea中不编译(版本12.0.6,带有scala插件0.22.302)

Idea的问题在于,nodeSum是在使用之后定义的

 > <console>:13: error: not found: value nodeSum
 case n: Node => nodeSum(n)
:13:错误:找不到:值nodeSum
案例n:Node=>nodeSum(n)

这是正确的行为吗?我知道我可以将nodeSum和leafSum实体直接内联到匹配实体。但有没有其他方法可以绕过这个想法呢?为什么它在Eclipse中工作?

我也有同样的问题。在我看来,IntelliJ支持Scala和Play!框架真的很糟糕
 > <console>:13: error: not found: value nodeSum
 case n: Node => nodeSum(n)