How to use Scala in IntelliJ IDEA (or: why is it so difficult to get a working IDE for Scala)?

前端 未结 9 1642
逝去的感伤
逝去的感伤 2021-01-30 10:26

I recently gave up trying to use Scala in Eclipse (basic stuff like completion doesn\'t work). So now I\'m trying IntelliJ. I\'m not getting very far.

I\'ve been able to

9条回答
  •  北海茫月
    2021-01-30 11:01

    I just did a fresh install and had exactly this same problem myself. It turned out that, because I had created the file in the root package, IDEA had added a package statement at the top with naming a package. I assume that this then got compiled as "package object Main" - valid syntax in 2.8? Anyway, I deleted the line that said package and it all worked fine.

提交回复
热议问题