A problem parsing/compiling a basic scala compilation unit

Using scala plugin 0.2.25444 for Intellij 9.0M1 on OS X:

The following fails to compile yielding an error with no error text:

object HelloWorld  {
  def main(args: Array[String]) {
    println("hello")
  }
}

If I append "; foo" to the above code as shown below it compiles without error:

object HelloWorld  {
  def main(args: Array[String]) {
    println("hello")
  }
}; foo

I'm attempting to use Intellij as a platform to teach myself Scala,
but this seems like a fairly basic mistake...

Any ideas?

2 comments
Comment actions Permalink

Just wanted to add that I'm using Scala version 2.7.5.

0
Comment actions Permalink

At first, try to update plugin to 0.2.25499 version for 10558 IDEA EAP. May be it helps.
Adding "; foo" is a bad idea, because this code is not compilble scala class (so there is no compilation on this file), it's just scala script file, which cause error on running (because method foo doesn't exist).
Your case I cannot reproduce (but I use 25499 version).

Best regards,
Alexander Podkhlayuzin.

0

Please sign in to leave a comment.