Why do I need semicolons after import?

I have never used Traits much in Scala, and I want to change that. I have this code:

import tools.nsc.io.Path
import java.io.File

trait ImageFileAcceptor extends FileAcceptor {
    override def accept(f:File) =  {
        super.accept(f) match {
            case true => {
                // additional work to see if it really an image
            }
            case _ => false
        }
    }
}

The problem is that when compiling with sbtI get:

ImageFileAcceptor.scala:2: ';' expected but 'import' found.

If you add after import ;, the code compiles. Here FileAcceptor:

import java.io.File

trait FileAcceptor extends Acceptable {
    override def accept(f:File):Boolean = f.isFile
}

And here Acceptable:

import java.io.File

trait Acceptable {
    def accept(f:File):Boolean
}

I do not understand why I need semicolons after import.

EDIT: maybe sbt's output is useful:

[info] Building project tt 1.0 against Scala 2.8.1
[info]    using sbt.DefaultProject with sbt 0.7.5 and Scala 2.7.7
+5
source share
1 answer

scala Macintosh - \r - scala , . 1.2 Scala . , . Windows (\r\n), Unix (\n). scala Java .

+4

All Articles