diff options
author | mihaylov <mihaylov@epfl.ch> | 2006-11-01 16:03:28 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2006-11-01 16:03:28 +0000 |
commit | 257a1845d3db3477a0b5939e94d77b0495d89561 (patch) | |
tree | 0aedf35621282407918e0f56b3b5ffc0952e6a14 /test/files/neg | |
parent | 8b0cd5cf7c2a682dd70d6b8ea32b521015bf2269 (diff) | |
download | scala-257a1845d3db3477a0b5939e94d77b0495d89561.tar.gz scala-257a1845d3db3477a0b5939e94d77b0495d89561.tar.bz2 scala-257a1845d3db3477a0b5939e94d77b0495d89561.zip |
Refactored portability support
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/bug421.scala | 2 | ||||
-rw-r--r-- | test/files/neg/bug500.scala | 2 | ||||
-rw-r--r-- | test/files/neg/bug501.scala | 2 | ||||
-rw-r--r-- | test/files/neg/bug692.check | 2 | ||||
-rwxr-xr-x | test/files/neg/bug692.scala | 12 | ||||
-rw-r--r-- | test/files/neg/bug779.scala | 2 | ||||
-rw-r--r-- | test/files/neg/constrs.check | 4 | ||||
-rw-r--r-- | test/files/neg/constrs.scala | 2 | ||||
-rw-r--r-- | test/files/neg/forward.scala | 2 | ||||
-rw-r--r-- | test/files/neg/viewtest.scala | 6 |
10 files changed, 18 insertions, 18 deletions
diff --git a/test/files/neg/bug421.scala b/test/files/neg/bug421.scala index 3e014b7500..43f6c9dafd 100644 --- a/test/files/neg/bug421.scala +++ b/test/files/neg/bug421.scala @@ -1,5 +1,5 @@ object foo { - case class Bar(a:String, b:Object, c:String*); + case class Bar(a:String, b:AnyRef, c:String*); Bar("foo","meets","bar") match { case Bar("foo",_*) => error("huh?"); diff --git a/test/files/neg/bug500.scala b/test/files/neg/bug500.scala index d572cd8b80..d843d71f07 100644 --- a/test/files/neg/bug500.scala +++ b/test/files/neg/bug500.scala @@ -14,7 +14,7 @@ object Test { def main(args: Array[String]): Unit = { try { val i: Int = Magic.magic("42"); - System.out.println(i); + Console.println(i); } catch { case ex: Throwable => ex.printStackTrace() } diff --git a/test/files/neg/bug501.scala b/test/files/neg/bug501.scala index 454344974a..437ab8f21e 100644 --- a/test/files/neg/bug501.scala +++ b/test/files/neg/bug501.scala @@ -13,6 +13,6 @@ object Magic { object Test { def main(args: Array[String]): Unit = { val i: Int = Magic.magic("42"); - System.out.println(i); + Console.println(i); } } diff --git a/test/files/neg/bug692.check b/test/files/neg/bug692.check index afd2639123..2cd761b568 100644 --- a/test/files/neg/bug692.check +++ b/test/files/neg/bug692.check @@ -2,7 +2,7 @@ bug692.scala:3 error: not found: type T trait Type[T0] extends Type0[T]; ^ bug692.scala:10 error: class Foo takes type parameters - case class FooType extends ClassType[Foo,Object](ObjectType); + case class FooType extends ClassType[Foo,AnyRef](ObjectType); ^ bug692.scala:13 error: class Foo takes type parameters case class BarType[T3 <: Foo](tpeT : RefType[T3]) extends ClassType[Bar[T3],Foo](FooType); diff --git a/test/files/neg/bug692.scala b/test/files/neg/bug692.scala index 50976f1121..dc5a9040a0 100755 --- a/test/files/neg/bug692.scala +++ b/test/files/neg/bug692.scala @@ -1,13 +1,13 @@ abstract class test3 { trait Type0[+T0]; trait Type[T0] extends Type0[T]; - trait ClassType0[+C <: Object] extends Type0[C]; - abstract class RefType[C <: Object] extends Type[C]; - case class ObjectType extends RefType[Object]; - abstract class ClassType[C <: Z, Z <: Object](zuper : RefType[Z]) extends RefType[C]; + trait ClassType0[+C <: AnyRef] extends Type0[C]; + abstract class RefType[C <: AnyRef] extends Type[C]; + case class ObjectType extends RefType[AnyRef]; + abstract class ClassType[C <: Z, Z <: AnyRef](zuper : RefType[Z]) extends RefType[C]; - case class FooType extends ClassType[Foo,Object](ObjectType); + case class FooType extends ClassType[Foo,AnyRef](ObjectType); implicit def typeOfFoo = FooType(); case class BarType[T3 <: Foo](tpeT : RefType[T3]) extends ClassType[Bar[T3],Foo](FooType); @@ -15,6 +15,6 @@ abstract class test3 { BarType(elem); - class Foo[A <: Object]; + class Foo[A <: AnyRef]; class Bar[A <: Foo](implicit tpeA : Type[A]) extends Foo; } diff --git a/test/files/neg/bug779.scala b/test/files/neg/bug779.scala index 9179fab4f8..cc92f9062a 100644 --- a/test/files/neg/bug779.scala +++ b/test/files/neg/bug779.scala @@ -1,6 +1,6 @@ abstract class Foo { trait Node { - def ast: Object = null + def ast: AnyRef = null } trait Something extends Node { override def ast = return null diff --git a/test/files/neg/constrs.check b/test/files/neg/constrs.check index 4da2b16b3d..eae90b0163 100644 --- a/test/files/neg/constrs.check +++ b/test/files/neg/constrs.check @@ -1,8 +1,8 @@ constrs.scala:6 error: type T is not a member of object test - def this(y: int)(z: int)(t: this.T) = { this(this.u + y + z); System.out.println(x) } + def this(y: int)(z: int)(t: this.T) = { this(this.u + y + z); Console.println(x) } ^ constrs.scala:6 error: value u is not a member of object test - def this(y: int)(z: int)(t: this.T) = { this(this.u + y + z); System.out.println(x) } + def this(y: int)(z: int)(t: this.T) = { this(this.u + y + z); Console.println(x) } ^ constrs.scala:10 error: called constructor must precede calling constructor def this() = this("abc") diff --git a/test/files/neg/constrs.scala b/test/files/neg/constrs.scala index 5c4ac071e8..e425a25120 100644 --- a/test/files/neg/constrs.scala +++ b/test/files/neg/constrs.scala @@ -3,7 +3,7 @@ object test { abstract class Test(x: int) { type T; val u = x; - def this(y: int)(z: int)(t: this.T) = { this(this.u + y + z); System.out.println(x) } + def this(y: int)(z: int)(t: this.T) = { this(this.u + y + z); Console.println(x) } } class Foo(x: int) { diff --git a/test/files/neg/forward.scala b/test/files/neg/forward.scala index 5e21e4c1fe..b7f7a50583 100644 --- a/test/files/neg/forward.scala +++ b/test/files/neg/forward.scala @@ -18,7 +18,7 @@ object Test { } { def f: int = g; - System.out.println("foo"); + Console.println("foo"); def g: int = f; } } diff --git a/test/files/neg/viewtest.scala b/test/files/neg/viewtest.scala index 5a8abdccfd..da26ccbfad 100644 --- a/test/files/neg/viewtest.scala +++ b/test/files/neg/viewtest.scala @@ -96,21 +96,21 @@ object Test { for (val s <- args) { t = t insert s } - System.out.println(t.elements) + Console.println(t.elements) } { var t: Tree[Str] = Empty for (val s <- args) { t = t insert Str(s) } - System.out.println(t.elements) + Console.println(t.elements) } { var t: Tree[List[char]] = Empty for (val s <- args) { t = t insert toCharList(s) } - System.out.println(t.elements) + Console.println(t.elements) } } } |