diff options
-rw-r--r-- | test/files/jvm5/attributes.scala | 2 | ||||
-rw-r--r-- | test/files/neg/bug521.check | 8 | ||||
-rw-r--r-- | test/files/neg/bug521.scala | 20 | ||||
-rw-r--r-- | test/files/pos/bug32.scala | 2 | ||||
-rw-r--r-- | test/files/pos/exceptions.scala | 2 |
5 files changed, 13 insertions, 21 deletions
diff --git a/test/files/jvm5/attributes.scala b/test/files/jvm5/attributes.scala index be949e25a9..2f8e434fa4 100644 --- a/test/files/jvm5/attributes.scala +++ b/test/files/jvm5/attributes.scala @@ -12,7 +12,7 @@ object Test1 { } object Test2 { - import java.io._ + import java.io.{BufferedReader,FileReader, IOException} class Reader(fname: String) { private val in = new BufferedReader(new FileReader(fname)) [throws(classOf[IOException])] diff --git a/test/files/neg/bug521.check b/test/files/neg/bug521.check index fa2ddffbaf..e7b149dca4 100644 --- a/test/files/neg/bug521.check +++ b/test/files/neg/bug521.check @@ -1,14 +1,14 @@ -bug521.scala:12 error: class PlainFile needs to be abstract, since method path in class AbstractFile of type => java.lang.String is not defined +bug521.scala:10 error: class PlainFile needs to be abstract, since method path in class AbstractFile of type => java.lang.String is not defined class PlainFile(val file : File) extends AbstractFile {} ^ -bug521.scala:21 error: error overriding value file in class PlainFile of type java.io.File; +bug521.scala:13 error: error overriding value file in class PlainFile of type java.io.File; value file needs `override' modifier final class ZipArchive(val file : File, archive : ZipFile) extends PlainFile(file) { ^ -bug521.scala:21 error: class ZipArchive needs to be abstract, since method path in class AbstractFile of type => java.lang.String is not defined +bug521.scala:13 error: class ZipArchive needs to be abstract, since method path in class AbstractFile of type => java.lang.String is not defined final class ZipArchive(val file : File, archive : ZipFile) extends PlainFile(file) { ^ -bug521.scala:23 error: error overriding value path in class VirtualFile of type java.lang.String; +bug521.scala:15 error: error overriding value path in class VirtualFile of type java.lang.String; method path needs to be an immutable value override def path = ""; ^ diff --git a/test/files/neg/bug521.scala b/test/files/neg/bug521.scala index 065f65557c..c6afebc0be 100644 --- a/test/files/neg/bug521.scala +++ b/test/files/neg/bug521.scala @@ -1,23 +1,15 @@ +package test + +import java.io.File +import java.util.zip.ZipFile -// AbstractFile.scala -package test; -import java.io._; abstract class AbstractFile { def path : String; } -// PlainFile.scala -//package scala.tools.nsc.io; -//import java.io._; class PlainFile(val file : File) extends AbstractFile {} -// VirtualFile.scala -//package scala.tools.nsc.io; -class VirtualFile(val name : String, val path : String) extends AbstractFile { -} -// ZipArchive.scala -//package scala.tools.nsc.io; -//import java.io._; -import java.util.zip._; +class VirtualFile(val name : String, val path : String) extends AbstractFile {} + final class ZipArchive(val file : File, archive : ZipFile) extends PlainFile(file) { class Entry(name : String, path : String) extends VirtualFile(name, path) { override def path = ""; diff --git a/test/files/pos/bug32.scala b/test/files/pos/bug32.scala index 7f901a9ac1..727a7d4e99 100644 --- a/test/files/pos/bug32.scala +++ b/test/files/pos/bug32.scala @@ -1,4 +1,4 @@ -import java.io._; +import java.io.{OutputStream, PrintStream}; class PromptStream(s: OutputStream) extends PrintStream(s) { override def println() = super.println(); diff --git a/test/files/pos/exceptions.scala b/test/files/pos/exceptions.scala index f71d215a23..52c33fb43a 100644 --- a/test/files/pos/exceptions.scala +++ b/test/files/pos/exceptions.scala @@ -1,4 +1,4 @@ -import java.io._; +import java.io.IOException; object Test { |