Scala giving me "illegal start of definition"

Posted by Malvolio on Stack Overflow See other posts from Stack Overflow or by Malvolio
Published on 2010-04-13T18:43:06Z Indexed on 2010/04/13 18:53 UTC
Read the original article Hit count: 387

Filed under:

I'm trying to get started with Scala and cannot get out of the starting gate.

A file consisting of the line

package x

gives me

error: illegal start of definition

Regardless of what x is and regardless of where I put the file (I had a theory that I had to place the file in a directory hierarchy to match the package definition, but no). I get the same error with the example code from the web site and with the REPL.

© Stack Overflow or respective owner

Related posts about scala