summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2006-11-11 07:54:39 +0000
committermihaylov <mihaylov@epfl.ch>2006-11-11 07:54:39 +0000
commit25b1b24c08f23f94eb817357cb5fe02e05d706a1 (patch)
tree9a63f8919ff60ab8c6a7f20c7712d0a6bf8ea1a6
parent61f333639f2f34be8f0b955d858c8fc028dbdea2 (diff)
downloadscala-25b1b24c08f23f94eb817357cb5fe02e05d706a1.tar.gz
scala-25b1b24c08f23f94eb817357cb5fe02e05d706a1.tar.bz2
scala-25b1b24c08f23f94eb817357cb5fe02e05d706a1.zip
Removed java.io._ imports from the test suite
-rw-r--r--test/files/jvm5/attributes.scala2
-rw-r--r--test/files/neg/bug521.check8
-rw-r--r--test/files/neg/bug521.scala20
-rw-r--r--test/files/pos/bug32.scala2
-rw-r--r--test/files/pos/exceptions.scala2
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 {