From c901a0675711a92ff714cfc909013a67a88c0ca3 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 4 Oct 2010 06:22:31 +0000 Subject: Another batch of busywork shuffling the content... Another batch of busywork shuffling the contents of pending around. Can almost see some daylight. No review. --- test/pending/run/array_casts.check | 16 -------------- test/pending/run/array_casts.scala | 42 ------------------------------------ test/pending/run/arrays-2.check | 7 ------ test/pending/run/arrays-2.scala | 25 --------------------- test/pending/run/bug1006.check | 1 - test/pending/run/bug1031.scala | 11 ---------- test/pending/run/bug1042.scala | 14 ------------ test/pending/run/castsingleton.check | 2 -- test/pending/run/mixins.scala | 6 ------ test/pending/run/preinits.scala | 6 ------ test/pending/run/t0048.check | 1 - test/pending/run/t0048.scala | 13 ----------- test/pending/run/t0446.scala | 6 ------ test/pending/run/t0565.scala | 22 ------------------- test/pending/run/t0727.check | 2 -- test/pending/run/t0727.scala | 5 ----- test/pending/run/t0732.check | 3 --- test/pending/run/t0732.scala | 8 ------- test/pending/run/t0818.scala | 4 ---- test/pending/run/t0947.check | 1 - test/pending/run/t0947.scala | 8 ------- test/pending/run/t1044.scala | 5 ----- test/pending/run/t1980.scala | 16 +++++++------- test/pending/run/t3609.scala | 19 +++++++++++++++- test/pending/run/treesetmap.check | 1 - test/pending/run/treesetmap.scala | 5 ----- 26 files changed, 26 insertions(+), 223 deletions(-) delete mode 100644 test/pending/run/array_casts.check delete mode 100644 test/pending/run/array_casts.scala delete mode 100644 test/pending/run/arrays-2.check delete mode 100644 test/pending/run/arrays-2.scala delete mode 100644 test/pending/run/bug1006.check delete mode 100644 test/pending/run/bug1031.scala delete mode 100644 test/pending/run/bug1042.scala delete mode 100644 test/pending/run/castsingleton.check delete mode 100644 test/pending/run/mixins.scala delete mode 100644 test/pending/run/preinits.scala delete mode 100644 test/pending/run/t0048.check delete mode 100644 test/pending/run/t0048.scala delete mode 100644 test/pending/run/t0446.scala delete mode 100644 test/pending/run/t0565.scala delete mode 100644 test/pending/run/t0727.check delete mode 100644 test/pending/run/t0727.scala delete mode 100644 test/pending/run/t0732.check delete mode 100644 test/pending/run/t0732.scala delete mode 100644 test/pending/run/t0818.scala delete mode 100644 test/pending/run/t0947.check delete mode 100644 test/pending/run/t0947.scala delete mode 100644 test/pending/run/t1044.scala delete mode 100644 test/pending/run/treesetmap.check delete mode 100644 test/pending/run/treesetmap.scala (limited to 'test/pending') diff --git a/test/pending/run/array_casts.check b/test/pending/run/array_casts.check deleted file mode 100644 index f7d3e5036c..0000000000 --- a/test/pending/run/array_casts.check +++ /dev/null @@ -1,16 +0,0 @@ -is object - true -is seq - true -is collection - true -is random-access-seq - true -is random-access-seq-mutable - true -not string - true -not list - true -class [I -Array(10) -Array(10) -Array(10) -Array(10) -Good, arrays are not lists -Good, arrays are not rich strings -is-seq array true -class [I diff --git a/test/pending/run/array_casts.scala b/test/pending/run/array_casts.scala deleted file mode 100644 index 0691fe06fe..0000000000 --- a/test/pending/run/array_casts.scala +++ /dev/null @@ -1,42 +0,0 @@ -object Test { - val a = Array(10) - def main(args : Array[String]) : Unit = { - val a = this.a : AnyRef - Console.println("is object - " + a.isInstanceOf[Object]) - Console.println("is seq - " + a.isInstanceOf[Seq[_]]) - Console.println("is collection - " + a.isInstanceOf[Collection[_]]) - Console.println("is random-access-seq - " + a.isInstanceOf[RandomAccessSeq[_]]) - Console.println("is random-access-seq-mutable - " + a.isInstanceOf[RandomAccessSeq.Mutable[_]]) - Console.println("not string - " + !a.isInstanceOf[String]) - Console.println("not list - " + !a.isInstanceOf[List[_]]) - try { - Console.println(a.asInstanceOf[Object].getClass) - } catch { case ex : ClassCastException => Console.println("Bad, arrays should be objects") } - try { - Console.println(a.asInstanceOf[Seq[_]]) - } catch { case ex : ClassCastException => Console.println("Bad, arrays should be seqs") } - try { - Console.println(a.asInstanceOf[Collection[_]]) - } catch { case ex : ClassCastException => Console.println("Bad, arrays should be collections") } - try { - Console.println(a.asInstanceOf[RandomAccessSeq[_]]) - } catch { case ex : ClassCastException => Console.println("Bad, arrays should be random access seqs") } - try { - Console.println(a.asInstanceOf[RandomAccessSeq.Mutable[_]]) - } catch { case ex : ClassCastException => Console.println("Bad, arrays should be mutable random access seqs") } - try { - Console.println("not expected: " + a.asInstanceOf[List[_]]) - } catch { case ex : ClassCastException => Console.println("Good, arrays are not lists") } - try { - Console.println("not expected: " + a.asInstanceOf[runtime.RichString]) - throw new Error("not expected") - } catch { case ex : ClassCastException => Console.println("Good, arrays are not rich strings") } - // check that arrays as seqs are still dynamically typed as arrays - val s = this.a : Seq[Int] - Console.println("is-seq array " + s.isInstanceOf[Array[Char]]) - try { - Console.println(s.asInstanceOf[Array[Int]].getClass) - } catch { case ex : ClassCastException => Console.println("Bad, arrays as seqs should still be arrays of Int") } - () - } -} diff --git a/test/pending/run/arrays-2.check b/test/pending/run/arrays-2.check deleted file mode 100644 index ce28533c20..0000000000 --- a/test/pending/run/arrays-2.check +++ /dev/null @@ -1,7 +0,0 @@ -a1=Array(3, 2, 1) -a1=[3,2,1] -a2=Array(0, 4, 2, 6) -a2=[0,4,2,6] -a2=[0,7,4,2,1,3,6,5] -a2=[0,1,2,3,4,5,6,7] -true diff --git a/test/pending/run/arrays-2.scala b/test/pending/run/arrays-2.scala deleted file mode 100644 index bee22db577..0000000000 --- a/test/pending/run/arrays-2.scala +++ /dev/null @@ -1,25 +0,0 @@ -//############################################################################ -// Arrays 2 -//############################################################################ - -//############################################################################ - -object Test extends Application { - val a1 = Array(1, 2, 3) - val a2 = Array(0, 7, 4, 2, 1, 3, 6, 5) - val a3 = new Array(1, 2, 3) // ticket #193 (VerifyError) - - def _toString[A](a: Array[A]) = a.mkString("[", ",", "]") - - // slice: see file slices.scala - println("a1=" + a1.reverse) - println("a1=" + _toString(a1.reverse)) - println("a2=" + a2.filter(_ % 2 == 0)) - println("a2=" + _toString(a2.filter(_ % 2 == 0))) - - println("a2=" + _toString(a2)) - util.Sorting.stableSort(a2) - println("a2=" + _toString(a2)) - - println(a1 deepEquals a3) -} diff --git a/test/pending/run/bug1006.check b/test/pending/run/bug1006.check deleted file mode 100644 index 409940768f..0000000000 --- a/test/pending/run/bug1006.check +++ /dev/null @@ -1 +0,0 @@ -23 diff --git a/test/pending/run/bug1031.scala b/test/pending/run/bug1031.scala deleted file mode 100644 index 4db5674489..0000000000 --- a/test/pending/run/bug1031.scala +++ /dev/null @@ -1,11 +0,0 @@ -abstract class Tree -case class Foo(xs: List[Int]) extends Tree - -object test extends Application { - Foo(Nil) match { - case Foo(xs: List[_]) => - Console.println(xs) - case _ => - ; - } -} diff --git a/test/pending/run/bug1042.scala b/test/pending/run/bug1042.scala deleted file mode 100644 index 26b06a6f0c..0000000000 --- a/test/pending/run/bug1042.scala +++ /dev/null @@ -1,14 +0,0 @@ -abstract class A { - override def toString(): String // crucial - - def toString(sb: StringBuilder): StringBuilder // crucial -} - -case class B extends A { - // overloaded version is implemented, causing toString not to be implemented? - def toString(sb: StringBuilder): StringBuilder = error("") -} - -object Test extends Application { - Console.println(B) -} diff --git a/test/pending/run/castsingleton.check b/test/pending/run/castsingleton.check deleted file mode 100644 index 49742281f0..0000000000 --- a/test/pending/run/castsingleton.check +++ /dev/null @@ -1,2 +0,0 @@ -L() -L() diff --git a/test/pending/run/mixins.scala b/test/pending/run/mixins.scala deleted file mode 100644 index c7926c9c53..0000000000 --- a/test/pending/run/mixins.scala +++ /dev/null @@ -1,6 +0,0 @@ -trait A { val x: Int } -trait B extends A { override val x = 1 } // with A -trait C extends A { override val x = 2 } // with A -object Test extends B with C with Application { - println(x) -} diff --git a/test/pending/run/preinits.scala b/test/pending/run/preinits.scala deleted file mode 100644 index 8de43b62ea..0000000000 --- a/test/pending/run/preinits.scala +++ /dev/null @@ -1,6 +0,0 @@ -trait A { val x: Int; println("A") } -trait B extends { override val x = 1 } with A { println("B") } -trait C extends { override val x = 2 } with A -object Test extends B with C with Application { - println(x) -} diff --git a/test/pending/run/t0048.check b/test/pending/run/t0048.check deleted file mode 100644 index 1e8b314962..0000000000 --- a/test/pending/run/t0048.check +++ /dev/null @@ -1 +0,0 @@ -6 diff --git a/test/pending/run/t0048.scala b/test/pending/run/t0048.scala deleted file mode 100644 index 71f37d26e4..0000000000 --- a/test/pending/run/t0048.scala +++ /dev/null @@ -1,13 +0,0 @@ -object A1 { - object A2 { - class X { def unapply(v : Int) = Some(v + 1) } - } -} - -object C { - def main(args: Array[String]) { - val q = new A1.A2.X - val res = 5 match { case q(x) => x } - println(res) - } -} diff --git a/test/pending/run/t0446.scala b/test/pending/run/t0446.scala deleted file mode 100644 index 0f74b32ba0..0000000000 --- a/test/pending/run/t0446.scala +++ /dev/null @@ -1,6 +0,0 @@ -object Test extends Application { - val a = Array(1,3).takeWhile(_ < 2) - val b = Array(1,3).dropWhile(_ < 2) - println(a.toString) - println(b.toString) -} diff --git a/test/pending/run/t0565.scala b/test/pending/run/t0565.scala deleted file mode 100644 index eb6e32e644..0000000000 --- a/test/pending/run/t0565.scala +++ /dev/null @@ -1,22 +0,0 @@ -object Test extends Application { - - class MacGuffin - - object A { - var x : { type T >: Null <: AnyRef; - val y : T; - def z (w : T) : T } = - new { type T = String; - val y = "foo"; - def z (w : String) = w + "bar" } - lazy val u = { println("u evaluated"); x } - def foo (v : => u.type#T) : u.type#T = { - x = new { type T = MacGuffin; - val y = new MacGuffin; - def z (w : MacGuffin) = w } - u.z(v) - } - } - - A.foo(A.u.y) -} diff --git a/test/pending/run/t0727.check b/test/pending/run/t0727.check deleted file mode 100644 index bb101b641b..0000000000 --- a/test/pending/run/t0727.check +++ /dev/null @@ -1,2 +0,0 @@ -true -true diff --git a/test/pending/run/t0727.scala b/test/pending/run/t0727.scala deleted file mode 100644 index 9f5be7c108..0000000000 --- a/test/pending/run/t0727.scala +++ /dev/null @@ -1,5 +0,0 @@ -object t0727 extends Application { - val arr = Array("foo") - println(arr.isInstanceOf[Array[String]]) - println(Array("foo").isInstanceOf[Array[String]]) -} diff --git a/test/pending/run/t0732.check b/test/pending/run/t0732.check deleted file mode 100644 index e4ec30754a..0000000000 --- a/test/pending/run/t0732.check +++ /dev/null @@ -1,3 +0,0 @@ -c - -c diff --git a/test/pending/run/t0732.scala b/test/pending/run/t0732.scala deleted file mode 100644 index 24fdba0017..0000000000 --- a/test/pending/run/t0732.scala +++ /dev/null @@ -1,8 +0,0 @@ -object t0732 extends Application { - val x1 = - println(x1 \ "@b") - val x2 = - println(x2 \ "@b") - val x3 = - println(x3 \ "@x:b") -} diff --git a/test/pending/run/t0818.scala b/test/pending/run/t0818.scala deleted file mode 100644 index 677b85d920..0000000000 --- a/test/pending/run/t0818.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Seth extends Application { - println( - new java.util.ArrayList[String]().toArray(Array[String]())) -} diff --git a/test/pending/run/t0947.check b/test/pending/run/t0947.check deleted file mode 100644 index e1431236cc..0000000000 --- a/test/pending/run/t0947.check +++ /dev/null @@ -1 +0,0 @@ -foo: test.Foo = Foo diff --git a/test/pending/run/t0947.scala b/test/pending/run/t0947.scala deleted file mode 100644 index 4297bb8777..0000000000 --- a/test/pending/run/t0947.scala +++ /dev/null @@ -1,8 +0,0 @@ -import scala.tools.nsc._ - -object Test extends Application { - class Foo { override def toString = "Foo" }; - - val Int = new Interpreter(new Settings()); - Int.bind("foo", "Test.Foo", new Test.Foo()); -} diff --git a/test/pending/run/t1044.scala b/test/pending/run/t1044.scala deleted file mode 100644 index c521e5837b..0000000000 --- a/test/pending/run/t1044.scala +++ /dev/null @@ -1,5 +0,0 @@ -// looks OK -object Main extends Application{ - val ducks = Array[AnyRef]("Huey", "Dewey", "Louie") - ducks.iterator/*.asInstanceOf[Iterator[String]]*/ -} diff --git a/test/pending/run/t1980.scala b/test/pending/run/t1980.scala index 67cb3ada9e..38353c6270 100644 --- a/test/pending/run/t1980.scala +++ b/test/pending/run/t1980.scala @@ -1,9 +1,9 @@ -by-name argument incorrectly evaluated on :-ending operator -Reported by: extempore Owned by: odersky -Priority: normal Component: Compiler -Keywords: Cc: paulp@… -Fixed in version: -Description +// by-name argument incorrectly evaluated on :-ending operator +// Reported by: extempore Owned by: odersky +// Priority: normal Component: Compiler +// Keywords: Cc: paulp@… +// Fixed in version: +// Description scala> def foo() = { println("foo") ; 5 } foo: ()Int @@ -19,9 +19,9 @@ scala> c m1 foo() scala> foo() m2_: c foo -But it is not evaluated if invoked directly: +// But it is not evaluated if invoked directly: scala> c.m2_:(foo()) -scala> +// scala> diff --git a/test/pending/run/t3609.scala b/test/pending/run/t3609.scala index 262948137d..030b417044 100755 --- a/test/pending/run/t3609.scala +++ b/test/pending/run/t3609.scala @@ -3,9 +3,26 @@ object Test extends Application { class B extends A def foo(x: A, y: B) = print(1) val foo = new { - //def apply(x: B, y: A) = print(3) + // def apply(x: B, y: A) = print(3) def apply = (x: B, z: B) => print(4) } foo(new B, new B) } + +// This code prints 1. If we remove comment, then it will print 4. +// Moreover following code prints 3 (which is most strange thing): + +object Test2 extends Application { + class A + class B extends A + def foo(x: A, y: B) = print(1) + val foo = new { + def apply(x: B, y: A) = print(3) + def apply = new { + def apply = (x: B, z: B) => print(4) + } + } + + foo(new B, new B) +} \ No newline at end of file diff --git a/test/pending/run/treesetmap.check b/test/pending/run/treesetmap.check deleted file mode 100644 index c55dc061db..0000000000 --- a/test/pending/run/treesetmap.check +++ /dev/null @@ -1 +0,0 @@ -class scala.collection.immutable.TreeMap diff --git a/test/pending/run/treesetmap.scala b/test/pending/run/treesetmap.scala deleted file mode 100644 index 60902d2b90..0000000000 --- a/test/pending/run/treesetmap.scala +++ /dev/null @@ -1,5 +0,0 @@ -object Test{ - def main(args : Array[String]){ - println(scala.collection.immutable.TreeSet(1, 2, 3).map(x => x).getClass); - } -} -- cgit v1.2.3