diff options
author | mihaylov <mihaylov@epfl.ch> | 2003-12-08 10:41:20 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2003-12-08 10:41:20 +0000 |
commit | 6b8ceb50e3c97f9317eb33613a4d5f21d4cf9d55 (patch) | |
tree | 012bebe0052939802f5d4e8cb10eed0617ad1677 /test | |
parent | 829cdf1f81a45701fbd4d9e701ebb7ab8e6a94c6 (diff) | |
download | scala-6b8ceb50e3c97f9317eb33613a4d5f21d4cf9d55.tar.gz scala-6b8ceb50e3c97f9317eb33613a4d5f21d4cf9d55.tar.bz2 scala-6b8ceb50e3c97f9317eb33613a4d5f21d4cf9d55.zip |
- added 'import java.lang.System' to allow the ...
- added 'import java.lang.System' to allow the tests to compile with the
.NET backend
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/Course-2002-04.scala | 2 | ||||
-rw-r--r-- | test/files/run/Course-2002-05.scala | 2 | ||||
-rw-r--r-- | test/files/run/Course-2002-07.scala | 2 | ||||
-rw-r--r-- | test/files/run/Course-2002-08.scala | 2 | ||||
-rw-r--r-- | test/files/run/Course-2002-09.scala | 2 | ||||
-rw-r--r-- | test/files/run/Course-2002-10.scala | 2 | ||||
-rw-r--r-- | test/files/run/Course-2002-13.scala | 2 | ||||
-rw-r--r-- | test/files/run/NestedClasses.scala | 2 | ||||
-rw-r--r-- | test/files/run/arrays.scala | 2 | ||||
-rw-r--r-- | test/files/run/bridges.scala | 2 | ||||
-rw-r--r-- | test/files/run/bugs.scala | 2 | ||||
-rw-r--r-- | test/files/run/constructors.scala | 2 | ||||
-rw-r--r-- | test/files/run/exceptions.scala | 2 | ||||
-rw-r--r-- | test/files/run/imports.scala | 2 | ||||
-rw-r--r-- | test/files/run/lisp.scala | 2 | ||||
-rw-r--r-- | test/files/run/misc.scala | 40 | ||||
-rw-r--r-- | test/files/run/overloads.scala | 2 | ||||
-rw-r--r-- | test/files/run/regularpatmat.scala | 2 |
18 files changed, 55 insertions, 19 deletions
diff --git a/test/files/run/Course-2002-04.scala b/test/files/run/Course-2002-04.scala index 714996e435..733a290db2 100644 --- a/test/files/run/Course-2002-04.scala +++ b/test/files/run/Course-2002-04.scala @@ -3,6 +3,8 @@ //############################################################################ // $Id$ +import java.lang.System; // to avoid name clash with .NET's library + object M0 { def quicksort[a] (less : (a,a) => Boolean) (xs : List[a]) : List[a] = { diff --git a/test/files/run/Course-2002-05.scala b/test/files/run/Course-2002-05.scala index 46b4acc349..3d6c8ebdcb 100644 --- a/test/files/run/Course-2002-05.scala +++ b/test/files/run/Course-2002-05.scala @@ -3,6 +3,8 @@ //############################################################################ // $Id$ +import java.lang.System; // to avoid name clash with .NET's library + object M0 { def partition[a](xs: List[a], pred: a => boolean): Pair[List[a], List[a]] = { if (xs.isEmpty) diff --git a/test/files/run/Course-2002-07.scala b/test/files/run/Course-2002-07.scala index 01a0e183b8..8ea07b19fe 100644 --- a/test/files/run/Course-2002-07.scala +++ b/test/files/run/Course-2002-07.scala @@ -3,6 +3,8 @@ //############################################################################ // $Id$ +import java.lang.System; // to avoid name clash with .NET's library + object M0 { trait Expr { diff --git a/test/files/run/Course-2002-08.scala b/test/files/run/Course-2002-08.scala index 86b8c4f559..f155689385 100644 --- a/test/files/run/Course-2002-08.scala +++ b/test/files/run/Course-2002-08.scala @@ -3,6 +3,8 @@ //############################################################################ // $Id$ +import java.lang.System; // to avoid name clash with .NET's library + import List._; object M0 { diff --git a/test/files/run/Course-2002-09.scala b/test/files/run/Course-2002-09.scala index 6468b012a5..edb957be23 100644 --- a/test/files/run/Course-2002-09.scala +++ b/test/files/run/Course-2002-09.scala @@ -3,6 +3,8 @@ //############################################################################ // $Id$ +import java.lang.System; // to avoid name clash with .NET's library + trait Option[a]; case class Some[a](value: a) extends Option[a]; case class None[a]() extends Option[a]; diff --git a/test/files/run/Course-2002-10.scala b/test/files/run/Course-2002-10.scala index d75d52e963..e634309018 100644 --- a/test/files/run/Course-2002-10.scala +++ b/test/files/run/Course-2002-10.scala @@ -3,6 +3,8 @@ //############################################################################ // $Id$ +import java.lang.System; // to avoid name clash with .NET's library + object M0 { def addStream (s1: Stream[int], s2: Stream[int]): Stream[int] = diff --git a/test/files/run/Course-2002-13.scala b/test/files/run/Course-2002-13.scala index 3a6b7c8718..022bb77ac5 100644 --- a/test/files/run/Course-2002-13.scala +++ b/test/files/run/Course-2002-13.scala @@ -3,6 +3,8 @@ //############################################################################ // $Id$ +import java.lang.System; // to avoid name clash with .NET's library + class Tokenizer(s: String, delimiters: String) extends Iterator[String] { private var i = 0; diff --git a/test/files/run/NestedClasses.scala b/test/files/run/NestedClasses.scala index 41850b98e7..88f1631166 100644 --- a/test/files/run/NestedClasses.scala +++ b/test/files/run/NestedClasses.scala @@ -69,6 +69,8 @@ class AAA1 extends AAA { } object Test { + import java.lang.System; // to avoid name clash with .NET's library + def main(args: Array[String]): Unit = { val a = new A1(12); val d = new a.D; diff --git a/test/files/run/arrays.scala b/test/files/run/arrays.scala index 02add14a46..356c50d0d1 100644 --- a/test/files/run/arrays.scala +++ b/test/files/run/arrays.scala @@ -5,6 +5,8 @@ //############################################################################ +import java.lang.System; // to avoid name clash with .NET's library + object arrays { type JObject = java.lang.Object; diff --git a/test/files/run/bridges.scala b/test/files/run/bridges.scala index 7e838affa6..8c6c013ae1 100644 --- a/test/files/run/bridges.scala +++ b/test/files/run/bridges.scala @@ -3,6 +3,8 @@ //############################################################################ // $Id$ +import java.lang.System; // to avoid name clash with .NET's library + class A; class B; class C; diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala index d7a7fef170..ebaaa1342b 100644 --- a/test/files/run/bugs.scala +++ b/test/files/run/bugs.scala @@ -3,6 +3,8 @@ //############################################################################ // $Id$ +import java.lang.System; // to avoid name clash with .NET's library + //############################################################################ // Bug 135 diff --git a/test/files/run/constructors.scala b/test/files/run/constructors.scala index 43d2da6af8..f46088fa00 100644 --- a/test/files/run/constructors.scala +++ b/test/files/run/constructors.scala @@ -2,6 +2,8 @@ // Test constructors, including multiple ones. +import java.lang.System; // to avoid name clash with .NET's library + class A(x: Int, y: Int) { def this(x: Int) = this(x, x); def this() = this(1); diff --git a/test/files/run/exceptions.scala b/test/files/run/exceptions.scala index b89056aa78..3a4ce70ca3 100644 --- a/test/files/run/exceptions.scala +++ b/test/files/run/exceptions.scala @@ -5,6 +5,8 @@ //############################################################################ +import java.lang.System; // to avoid name clash with .NET's library + abstract class IntMap[A] { def lookup(key: Int): A = match { case Empty() => error("KO") diff --git a/test/files/run/imports.scala b/test/files/run/imports.scala index 0eb342b984..2d13463336 100644 --- a/test/files/run/imports.scala +++ b/test/files/run/imports.scala @@ -3,6 +3,8 @@ //############################################################################ // $Id$ +import java.lang.System; // to avoid name clash with .NET's library + //############################################################################ object checker { diff --git a/test/files/run/lisp.scala b/test/files/run/lisp.scala index 847a112fe0..e4a9cc652d 100644 --- a/test/files/run/lisp.scala +++ b/test/files/run/lisp.scala @@ -3,6 +3,8 @@ //############################################################################ // $Id$ +import java.lang.System; // to avoid name clash with .NET's library + //############################################################################ // Lisp Scanner diff --git a/test/files/run/misc.scala b/test/files/run/misc.scala index 1468193ab6..0878b8142f 100644 --- a/test/files/run/misc.scala +++ b/test/files/run/misc.scala @@ -1,5 +1,7 @@ // $Id$ +import java.lang.System; // to avoid name clash with .NET's library + object Test { def fac(n: Int): Int = if (n < 2) 1 else fac(n - 1) * n; @@ -10,14 +12,14 @@ def fac(n: Int): Int = if (n < 2) 1 else fac(n - 1) * n; def fib(n: Int): Int = if (n < 2) 1 else fib(n - 1) + fib(n - 2); def show_fib(n: Int): Int = { - java.lang.System.out.print("### fib("); - java.lang.System.out.print(n); - java.lang.System.out.print(") = "); - java.lang.System.out.flush(); + System.out.print("### fib("); + System.out.print(n); + System.out.print(") = "); + System.out.flush(); val v = fib(n); - java.lang.System.out.print(v); - java.lang.System.out.println(); - java.lang.System.out.flush(); + System.out.print(v); + System.out.println(); + System.out.flush(); v } @@ -39,7 +41,7 @@ def apply_int(f: Int => Int, x: Int): Int = f(x); class MyClass() { override def toString() = "=== MyClass::toString ==="; - def test() = java.lang.System.out.println("=== MyClass::test ==="); + def test() = System.out.println("=== MyClass::test ==="); } class MySubclass() extends MyClass() { @@ -57,13 +59,13 @@ def foobar = { // java; // !!! why is this legal ? what does it return ? // java.lang; // java.lang.System; // !!! return the Class object ? - java.lang.System.out; - java.lang.System.out.println("### Hello"); - java.lang.System.out.print("### "); - java.lang.System.out.println(17); + System.out; + System.out.println("### Hello"); + System.out.print("### "); + System.out.println(17); // !!! java.lang.System.out.println("### " + 13); - java.lang.System.out.println("### Bye"); - java.lang.System.out.println(); + System.out.println("### Bye"); + System.out.println(); val x = 13; x; // !!! why are DefDef replaced by Block(Tree[0])? we should use Empty! @@ -103,17 +105,17 @@ def foobar = { val map: java.util.Map = new java.util.HashMap(); // why do we insert type casts as[scala.Any](); map.put("Hello", new java.lang.Integer(32)); - java.lang.System.out.println("Hello -> " + map.get("Hello")); + System.out.println("Hello -> " + map.get("Hello")); // !!! apply(map.get, "Hello"); - java.lang.System.out.println(); + System.out.println(); val myObj = new MyClass(); - java.lang.System.out.println(myObj); + System.out.println(myObj); val mySub = new MySubclass(); - java.lang.System.out.println(mySub); + System.out.println(mySub); // java.lang.System.out.println(myObj.test()); // !!! strange type error myObj.test(); - java.lang.System.out.println(); + System.out.println(); System.out.println(apply_any(id_any, "identity").toString()); //apply[java.lang.String](id[java.lang.String], "identity") diff --git a/test/files/run/overloads.scala b/test/files/run/overloads.scala index 9ec97e78bf..e9b9433962 100644 --- a/test/files/run/overloads.scala +++ b/test/files/run/overloads.scala @@ -3,6 +3,8 @@ //############################################################################ // $Id$ +import java.lang.System; // to avoid name clash with .NET's library + //############################################################################ object Ops { diff --git a/test/files/run/regularpatmat.scala b/test/files/run/regularpatmat.scala index 129e325abc..c4ebaf7ed7 100644 --- a/test/files/run/regularpatmat.scala +++ b/test/files/run/regularpatmat.scala @@ -1,5 +1,7 @@ // Burak's test suite for regular pattern matching +import java.lang.System; // to avoid name clash with .NET's library + // contains 17 visitors plus X // analyzer related (no execution) |