summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2006-10-06 17:34:40 +0000
committerMartin Odersky <odersky@gmail.com>2006-10-06 17:34:40 +0000
commit83b51eccb8dd72b5d5cffdd5c9b04f73dd292392 (patch)
treee3dc0f49e278d40a3b82443c4fadf6a31ab28273
parentd7a4f76d25820df20c9e8cd6594fa635f666dfe3 (diff)
downloadscala-83b51eccb8dd72b5d5cffdd5c9b04f73dd292392.tar.gz
scala-83b51eccb8dd72b5d5cffdd5c9b04f73dd292392.tar.bz2
scala-83b51eccb8dd72b5d5cffdd5c9b04f73dd292392.zip
renamed All->Nothing, AllRef -> Null while keep...
renamed All->Nothing, AllRef -> Null while keeping the old names as aliases.
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Definitions.scala8
-rw-r--r--test/files/jvm/serialization.scala4
-rw-r--r--test/files/neg/bug412.check2
-rw-r--r--test/files/neg/bug550.check2
-rw-r--r--test/files/neg/bug677.check6
-rwxr-xr-xtest/files/neg/bug677.scala4
-rw-r--r--test/files/neg/bug708.check2
-rw-r--r--test/files/run/arrays.scala10
-rw-r--r--test/files/run/bridges.scala16
-rw-r--r--test/files/run/bugs.check4
-rw-r--r--test/files/run/bugs.scala10
11 files changed, 34 insertions, 34 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Definitions.scala b/src/compiler/scala/tools/nsc/symtab/Definitions.scala
index 02ccd33287..f5bd1aa7b7 100644
--- a/src/compiler/scala/tools/nsc/symtab/Definitions.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Definitions.scala
@@ -475,13 +475,13 @@ trait Definitions requires SymbolTable {
val anyrefparam = List(AnyRefClass.typeConstructor)
- AllRefClass = newClass(ScalaPackageClass, nme.AllRef, anyrefparam)
+ AllRefClass = newClass(ScalaPackageClass, nme.Null, anyrefparam)
.setFlag(ABSTRACT | TRAIT | FINAL)
-// val oldAllRefClass = newAlias(ScalaPackageClass, nme.AllRef, AllRefClass.typeConstructor)
+ val oldAllRefClass = newAlias(ScalaPackageClass, nme.AllRef, AllRefClass.typeConstructor)
- AllClass = newClass(ScalaPackageClass, nme.All, anyparam)
+ AllClass = newClass(ScalaPackageClass, nme.Nothing, anyparam)
.setFlag(ABSTRACT | TRAIT | FINAL)
-// val oldAllClass = newAlias(ScalaPackageClass, nme.All, AllClass.typeConstructor)
+ val oldAllClass = newAlias(ScalaPackageClass, nme.All, AllClass.typeConstructor)
ClassClass = getClass("java.lang.Class")
StringClass = getClass("java.lang.String")
diff --git a/test/files/jvm/serialization.scala b/test/files/jvm/serialization.scala
index ec1bbbab13..17fc54aecf 100644
--- a/test/files/jvm/serialization.scala
+++ b/test/files/jvm/serialization.scala
@@ -46,8 +46,8 @@ object Test1_scala {
val x4 = { x: Int => 2 * x }
try {
- val y1: List[All] = Serialize.read(Serialize.write(x1));
- val y2: Option[All] = Serialize.read(Serialize.write(x2));
+ val y1: List[Nothing] = Serialize.read(Serialize.write(x1));
+ val y2: Option[Nothing] = Serialize.read(Serialize.write(x2));
val y3: Array[Int] = Serialize.read(Serialize.write(x3));
val y4: Function[Int, Int] = Serialize.read(Serialize.write(x4));
diff --git a/test/files/neg/bug412.check b/test/files/neg/bug412.check
index 6caf74fb3d..8d1f487f42 100644
--- a/test/files/neg/bug412.check
+++ b/test/files/neg/bug412.check
@@ -1,5 +1,5 @@
bug412.scala:9 error: type mismatch;
- found : scala.AllRef(null)
+ found : scala.Null(null)
required: A.this.CX with A.this.C2
val c: CX with C2 = null;
^
diff --git a/test/files/neg/bug550.check b/test/files/neg/bug550.check
index 25367af0e5..8ce38b21e4 100644
--- a/test/files/neg/bug550.check
+++ b/test/files/neg/bug550.check
@@ -1,7 +1,7 @@
bug550.scala:6 error: class List takes type parameters
def sum[a](xs: List)(implicit m: Monoid[a]): a =
^
-bug550.scala:8 error: no implicit argument matching parameter type Monoid[scala.All] was found.
+bug550.scala:8 error: no implicit argument matching parameter type Monoid[scala.Nothing] was found.
sum(List(1,2,3))
^
two errors found
diff --git a/test/files/neg/bug677.check b/test/files/neg/bug677.check
index 7086f259a3..90fceef364 100644
--- a/test/files/neg/bug677.check
+++ b/test/files/neg/bug677.check
@@ -1,6 +1,6 @@
bug677.scala:2 error: type mismatch;
found : () => scala.Int
- required: scala.All
- val zx: All = {() => 4}
- ^
+ required: scala.Nothing
+ val zx: Nothing = {() => 4}
+ ^
one error found
diff --git a/test/files/neg/bug677.scala b/test/files/neg/bug677.scala
index 06dcbe5557..c65ee9640f 100755
--- a/test/files/neg/bug677.scala
+++ b/test/files/neg/bug677.scala
@@ -1,3 +1,3 @@
object ga {
- val zx: All = {() => 4}
-} \ No newline at end of file
+ val zx: Nothing = {() => 4}
+}
diff --git a/test/files/neg/bug708.check b/test/files/neg/bug708.check
index 305c084416..e800fdd0df 100644
--- a/test/files/neg/bug708.check
+++ b/test/files/neg/bug708.check
@@ -1,4 +1,4 @@
-bug708.scala:8 error: error overriding type S in trait X with bounds >: scala.All <: A.this.T;
+bug708.scala:8 error: error overriding type S in trait X with bounds >: scala.Nothing <: A.this.T;
type S has incompatible type scala.Any
override private[A] type S = Any;
^
diff --git a/test/files/run/arrays.scala b/test/files/run/arrays.scala
index eee62afcb3..db7d381aa9 100644
--- a/test/files/run/arrays.scala
+++ b/test/files/run/arrays.scala
@@ -201,7 +201,7 @@ object Test {
val a0: Unit = ();
val a1: Boolean = false;
val a2: Int = 0;
- val a3: AllRef = null;
+ val a3: Null = null;
val a4: String = "a-z";
val a5: Symbol = 'token;
val a6: HashMap = new HashMap();
@@ -215,25 +215,25 @@ object Test {
val v4: Float = f2;
val v5: Double = d2;
- val r0: AllRef = a3;
+ val r0: Null = a3;
val r1: String = a4;
val r2: Symbol = a5;
val r3: HashMap = a6;
val r4: TreeMap = a7;
val r5: Strings = a8;
- val o0: AllRef = r0;
+ val o0: Null = r0;
val o1: String = r1;
val o2: Symbol = r2;
val o3: HashMap = r3;
val o4: TreeMap = r4;
val o5: Strings = r5;
- val m0: AllRef = r0;
+ val m0: Null = r0;
val m1: HashMap = r3;
val m2: TreeMap = r4;
- val n0: AllRef = r0;
+ val n0: Null = r0;
val n1: Strings = r5;
val n2: Nil.type= Nil;
diff --git a/test/files/run/bridges.scala b/test/files/run/bridges.scala
index 65ba2f13cc..9fd2c8e274 100644
--- a/test/files/run/bridges.scala
+++ b/test/files/run/bridges.scala
@@ -39,21 +39,21 @@ import Help.bar;
import Help.mix;
import Help.sub;
-abstract class Foo___ { type I>:AllRef<:AnyRef; def f: I ; f; }
-abstract class Foo__f { type I>:AllRef<:AnyRef; def f: I = {foo; null}; f; }
+abstract class Foo___ { type I>:Null<:AnyRef; def f: I ; f; }
+abstract class Foo__f { type I>:Null<:AnyRef; def f: I = {foo; null}; f; }
abstract class Foo_I_ { class I ; def f: I ; f; }
abstract class Foo_If { class I ; def f: I = {foo; null}; f; }
-abstract class FooX__[X] { type I>:AllRef<:AnyRef; def f: I ; f; }
-abstract class FooX_f[X] { type I>:AllRef<:AnyRef; def f: I = {foo; null}; f; }
+abstract class FooX__[X] { type I>:Null<:AnyRef; def f: I ; f; }
+abstract class FooX_f[X] { type I>:Null<:AnyRef; def f: I = {foo; null}; f; }
abstract class FooXI_[X] { class I ; def f: I ; f; }
abstract class FooXIf[X] { class I ; def f: I = {foo; null}; f; }
-trait Bar___ { type I>:AllRef<:AnyRef; def f: I ; f; }
-trait Bar__f { type I>:AllRef<:AnyRef; def f: I = {bar; null}; f; }
+trait Bar___ { type I>:Null<:AnyRef; def f: I ; f; }
+trait Bar__f { type I>:Null<:AnyRef; def f: I = {bar; null}; f; }
trait Bar_I_ { class I ; def f: I ; f; }
trait Bar_If { class I ; def f: I = {bar; null}; f; }
-trait BarY__[Y] { type I>:AllRef<:AnyRef; def f: I ; f; }
-trait BarY_f[Y] { type I>:AllRef<:AnyRef; def f: I = {bar; null}; f; }
+trait BarY__[Y] { type I>:Null<:AnyRef; def f: I ; f; }
+trait BarY_f[Y] { type I>:Null<:AnyRef; def f: I = {bar; null}; f; }
trait BarYI_[Y] { class I ; def f: I ; f; }
trait BarYIf[Y] { class I ; def f: I = {bar; null}; f; }
diff --git a/test/files/run/bugs.check b/test/files/run/bugs.check
index 1276cbbcc0..261c74ad15 100644
--- a/test/files/run/bugs.check
+++ b/test/files/run/bugs.check
@@ -44,8 +44,8 @@ ok
>>> bug 199
<<< bug 213
-Cannot cast unit to All
-Cannot cast empty string to AllRef
+Cannot cast unit to Nothing
+Cannot cast empty string to Null
>>> bug 213
<<< bug 217
diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala
index 6c24a198de..fc9c735ec9 100644
--- a/test/files/run/bugs.scala
+++ b/test/files/run/bugs.scala
@@ -214,8 +214,8 @@ trait Bug213Foo {
}
class Bug213Bar extends Bug213Foo {
- def testAll = (().asInstanceOf[All] : All);
- def testAllRef = ("".asInstanceOf[AllRef] : AllRef);
+ def testAll = (().asInstanceOf[Nothing] : Nothing);
+ def testAllRef = ("".asInstanceOf[Null] : Null);
}
object Bug213Test {
@@ -225,13 +225,13 @@ object Bug213Test {
foo.testAll;
} catch {
case e: java.lang.ClassCastException =>
- Console.println("Cannot cast unit to All");
+ Console.println("Cannot cast unit to Nothing");
}
try {
foo.testAllRef;
} catch {
case e: java.lang.ClassCastException =>
- Console.println("Cannot cast empty string to AllRef");
+ Console.println("Cannot cast empty string to Null");
}
()
}
@@ -335,7 +335,7 @@ object Bug257Test {
// version - A
abstract class Bug266AFoo {
- type T >: AllRef <: AnyRef;
+ type T >: Null <: AnyRef;
abstract class I0 { def f(x: T): Unit; f(null); }
}