From 83b51eccb8dd72b5d5cffdd5c9b04f73dd292392 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 6 Oct 2006 17:34:40 +0000 Subject: renamed All->Nothing, AllRef -> Null while keep... renamed All->Nothing, AllRef -> Null while keeping the old names as aliases. --- test/files/run/arrays.scala | 10 +++++----- test/files/run/bridges.scala | 16 ++++++++-------- test/files/run/bugs.check | 4 ++-- test/files/run/bugs.scala | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) (limited to 'test/files/run') 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); } } -- cgit v1.2.3