From d610e36fa53fcd8b6361293936af057b8563c33b Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 21 Feb 2011 18:32:06 +0000 Subject: Renamed Application to App. --- test/files/run/OrderingTest.scala | 2 +- test/files/run/ReverseSeqView.scala | 2 +- test/files/run/amp.scala | 2 +- test/files/run/arrayclone.scala | 2 +- test/files/run/arybufgrow.scala | 2 +- test/files/run/bitsets.scala | 2 +- test/files/run/breakout.scala | 4 ++-- test/files/run/bug1042.scala | 2 +- test/files/run/bug1044.scala | 2 +- test/files/run/bug1079.scala | 2 +- test/files/run/bug1110.scala | 2 +- test/files/run/bug1141.scala | 2 +- test/files/run/bug1192.scala | 2 +- test/files/run/bug1220.scala | 2 +- test/files/run/bug1300.scala | 2 +- test/files/run/bug1373.scala | 4 ++-- test/files/run/bug1466.scala | 2 +- test/files/run/bug1766.scala | 2 +- test/files/run/bug2075.scala | 4 ++-- test/files/run/bug216.scala | 2 +- test/files/run/bug2241.scala | 2 +- test/files/run/bug2276.scala | 2 +- test/files/run/bug2552.scala | 2 +- test/files/run/bug298.scala | 4 ++-- test/files/run/bug405.scala | 2 +- test/files/run/bug657.scala | 2 +- test/files/run/bug889.scala | 2 +- test/files/run/bug949.scala | 2 +- test/files/run/bug978.scala | 2 +- test/files/run/byname.scala | 2 +- test/files/run/caseclasses.scala | 2 +- test/files/run/castsingleton.scala | 2 +- test/files/run/checked.scala | 2 +- test/files/run/collections.scala | 2 +- test/files/run/colltest.scala | 2 +- test/files/run/colltest1.scala | 2 +- test/files/run/complicatedmatch.scala | 2 +- test/files/run/contrib674.scala | 2 +- test/files/run/ctor-order.scala | 2 +- test/files/run/exc.scala | 2 +- test/files/run/exc1.scala | 2 +- test/files/run/exc2.scala | 2 +- test/files/run/exceptions-nest.scala | 2 +- test/files/run/existentials.scala | 2 +- test/files/run/exoticnames.scala | 2 +- test/files/run/finally.scala | 2 +- test/files/run/fors.scala | 2 +- test/files/run/gadts.scala | 2 +- test/files/run/implicits.scala | 2 +- test/files/run/infiniteloop.scala | 2 +- test/files/run/infix.scala | 2 +- test/files/run/inliner-infer.scala | 2 +- test/files/run/intmap.scala | 2 +- test/files/run/issue192.scala | 2 +- test/files/run/iterables.scala | 2 +- test/files/run/json.scala | 2 +- test/files/run/lazy-exprs.scala | 2 +- test/files/run/lazy-leaks.scala | 2 +- test/files/run/lazy-locals.scala | 2 +- test/files/run/lazy-override-run.scala | 2 +- test/files/run/lazy-traits.scala | 2 +- test/files/run/map_test.scala | 2 +- test/files/run/matcharraytail.scala | 2 +- test/files/run/matchbytes.scala | 2 +- test/files/run/matchemptyarray.scala | 2 +- test/files/run/matchintasany.scala | 2 +- test/files/run/matchonstream.scala | 2 +- test/files/run/missingparams.scala | 2 +- test/files/run/multi-array.scala | 2 +- test/files/run/names-defaults.scala | 2 +- test/files/run/packrat1.scala | 2 +- test/files/run/packrat2.scala | 2 +- test/files/run/preinits.scala | 2 +- test/files/run/proxy.scala | 2 +- test/files/run/randomAccessSeq-apply.scala | 2 +- test/files/run/runtime-richChar.scala | 2 +- test/files/run/slices.scala | 2 +- test/files/run/sort.scala | 2 +- test/files/run/stream_flatmap_odds.scala | 4 ++-- test/files/run/streams.scala | 2 +- test/files/run/stringbuilder.scala | 2 +- test/files/run/structural.scala | 2 +- test/files/run/t0017.scala | 2 +- test/files/run/t0042.scala | 2 +- test/files/run/t0412.scala | 2 +- test/files/run/t0421.scala | 2 +- test/files/run/t0486.scala | 2 +- test/files/run/t0508.scala | 2 +- test/files/run/t0528.scala | 2 +- test/files/run/t0607.scala | 2 +- test/files/run/t0631.scala | 2 +- test/files/run/t0663.scala | 2 +- test/files/run/t0668.scala | 2 +- test/files/run/t0677.scala | 2 +- test/files/run/t0807.scala | 2 +- test/files/run/t0883.scala | 2 +- test/files/run/t0911.scala | 2 +- test/files/run/t0936.scala | 2 +- test/files/run/t1167.scala | 2 +- test/files/run/t1323.scala | 2 +- test/files/run/t1368.scala | 2 +- test/files/run/t1423.scala | 2 +- test/files/run/t1505.scala | 2 +- test/files/run/t1524.scala | 2 +- test/files/run/t153.scala | 4 ++-- test/files/run/t1535.scala | 2 +- test/files/run/t1537.scala | 2 +- test/files/run/t1591.scala | 2 +- test/files/run/t1618.scala | 2 +- test/files/run/t1620.scala | 2 +- test/files/run/t1718.scala | 2 +- test/files/run/t1747.scala | 2 +- test/files/run/t1773.scala | 2 +- test/files/run/t1939.scala | 2 +- test/files/run/t2030.scala | 2 +- test/files/run/t2111.scala | 2 +- test/files/run/t2147.scala | 2 +- test/files/run/t2176.scala | 2 +- test/files/run/t2177.scala | 2 +- test/files/run/t2236.scala | 2 +- test/files/run/t2255.scala | 2 +- test/files/run/t2503.scala | 2 +- test/files/run/t2788.scala | 4 ++-- test/files/run/t2813.2.scala | 2 +- test/files/run/t2857.scala | 2 +- test/files/run/t3038.scala | 2 +- test/files/run/t3038b.scala | 2 +- test/files/run/t3186.scala | 2 +- test/files/run/t3361.scala | 2 +- test/files/run/t3619.scala | 4 ++-- test/files/run/t3670.scala | 6 +++--- test/files/run/t3687.scala | 2 +- test/files/run/t3719.scala | 2 +- test/files/run/t3726.scala | 2 +- test/files/run/t3763.scala | 2 +- test/files/run/t3835.scala | 2 +- test/files/run/t3857.scala | 4 ++-- test/files/run/t3950.scala | 2 +- test/files/run/t4024.scala | 2 +- test/files/run/t4146.scala | 4 ++-- test/files/run/t498.scala | 4 ++-- test/files/run/tailcalls.scala | 2 +- test/files/run/tcpoly_monads.scala | 2 +- test/files/run/tcpoly_overriding.scala | 2 +- test/files/run/tcpoly_parseridioms.scala | 2 +- test/files/run/try.scala | 2 +- test/files/run/tuples.scala | 2 +- test/files/run/typealias_overriding.scala | 2 +- test/files/run/unboxingBug.scala | 2 +- test/files/run/viewtest.scala | 2 +- test/files/run/weakconform.scala | 2 +- 151 files changed, 164 insertions(+), 164 deletions(-) (limited to 'test/files/run') diff --git a/test/files/run/OrderingTest.scala b/test/files/run/OrderingTest.scala index fee15fc2f9..8af18aaba5 100644 --- a/test/files/run/OrderingTest.scala +++ b/test/files/run/OrderingTest.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def test[T](t1 : T, t2 : T)(implicit ord : Ordering[T]) = { val cmp = ord.compare(t1, t2); val cmp2 = ord.compare(t2, t1); diff --git a/test/files/run/ReverseSeqView.scala b/test/files/run/ReverseSeqView.scala index 836e4d6a1f..2004791bff 100644 --- a/test/files/run/ReverseSeqView.scala +++ b/test/files/run/ReverseSeqView.scala @@ -4,7 +4,7 @@ -object Test extends Application { +object Test extends App { val lstv = List(1, 2, 3).view val lstvr = lstv.reverse diff --git a/test/files/run/amp.scala b/test/files/run/amp.scala index 367f3b31e4..a1924ef637 100644 --- a/test/files/run/amp.scala +++ b/test/files/run/amp.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def foo() = { def f: Int = 1 diff --git a/test/files/run/arrayclone.scala b/test/files/run/arrayclone.scala index 2b56c53469..fbca38b42e 100644 --- a/test/files/run/arrayclone.scala +++ b/test/files/run/arrayclone.scala @@ -1,4 +1,4 @@ -object Test extends Application{ +object Test extends App{ BooleanArrayClone; ByteArrayClone; ShortArrayClone; diff --git a/test/files/run/arybufgrow.scala b/test/files/run/arybufgrow.scala index 9e18435243..fba859a456 100644 --- a/test/files/run/arybufgrow.scala +++ b/test/files/run/arybufgrow.scala @@ -1,6 +1,6 @@ import scala.collection.mutable._; -object Test extends Application { +object Test extends App { val buf = new ArrayBuffer[String]; for (i <- List.range(0,1000)) { buf += "hello"; diff --git a/test/files/run/bitsets.scala b/test/files/run/bitsets.scala index ac2b8eb5b9..a847c9940d 100644 --- a/test/files/run/bitsets.scala +++ b/test/files/run/bitsets.scala @@ -69,7 +69,7 @@ object TestImmutable { Console.println } -object Test extends Application { +object Test extends App { TestMutable TestImmutable } diff --git a/test/files/run/breakout.scala b/test/files/run/breakout.scala index 01ea08846e..8081405bd1 100644 --- a/test/files/run/breakout.scala +++ b/test/files/run/breakout.scala @@ -2,8 +2,8 @@ import scala.collection.generic._ import scala.collection._ import scala.collection.mutable._ -object Test extends Application { +object Test extends App { val l = List(1, 2, 3) val a: Array[Int] = l.map(_ + 1)(breakOut) println(a.mkString(", ")) -} \ No newline at end of file +} diff --git a/test/files/run/bug1042.scala b/test/files/run/bug1042.scala index 32eb49a7ec..1f39fff24a 100644 --- a/test/files/run/bug1042.scala +++ b/test/files/run/bug1042.scala @@ -9,6 +9,6 @@ case class B() extends A { def toString(sb: StringBuilder): StringBuilder = error("") } -object Test extends Application { +object Test extends App { Console.println(B) } diff --git a/test/files/run/bug1044.scala b/test/files/run/bug1044.scala index da20439823..7ac5058607 100644 --- a/test/files/run/bug1044.scala +++ b/test/files/run/bug1044.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val ducks = Array[AnyRef]("Huey", "Dewey", "Louie"); ducks.elements.asInstanceOf[Iterator[String]] } diff --git a/test/files/run/bug1079.scala b/test/files/run/bug1079.scala index ae8234bfe6..ce435d254b 100644 --- a/test/files/run/bug1079.scala +++ b/test/files/run/bug1079.scala @@ -1,3 +1,3 @@ -object Test extends Application { +object Test extends App { println( == ) } diff --git a/test/files/run/bug1110.scala b/test/files/run/bug1110.scala index 092bc85369..824643868c 100644 --- a/test/files/run/bug1110.scala +++ b/test/files/run/bug1110.scala @@ -6,6 +6,6 @@ class Stuff { assert(zoop(10) == 2) } -object Test extends Application { +object Test extends App { new Stuff } diff --git a/test/files/run/bug1141.scala b/test/files/run/bug1141.scala index a98e3cf204..9641343c7e 100644 --- a/test/files/run/bug1141.scala +++ b/test/files/run/bug1141.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val foo = new { def apply(args : String*) = args foreach println } diff --git a/test/files/run/bug1192.scala b/test/files/run/bug1192.scala index c199198932..a32cbf5c98 100644 --- a/test/files/run/bug1192.scala +++ b/test/files/run/bug1192.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val v1: Array[Array[Int]] = Array(Array(1, 2), Array(3, 4)) def f[T](w: Array[Array[T]]) { for (val r <- w) println(r.deep.toString) diff --git a/test/files/run/bug1220.scala b/test/files/run/bug1220.scala index 88baa980f5..75e0ea07e8 100644 --- a/test/files/run/bug1220.scala +++ b/test/files/run/bug1220.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { class QSRichIterable[A](self: Iterable[A]) { def filterMap[R](f: PartialFunction[A,R]) = diff --git a/test/files/run/bug1300.scala b/test/files/run/bug1300.scala index 1a759f4e1e..aa3580e33c 100644 --- a/test/files/run/bug1300.scala +++ b/test/files/run/bug1300.scala @@ -1,4 +1,4 @@ -object Test extends Application +object Test extends App { val a1 = Array(0,1,2,3).toArray[Any] // val a1 = x1.toArray[Any] diff --git a/test/files/run/bug1373.scala b/test/files/run/bug1373.scala index 537421c788..d6f9c1ee1c 100644 --- a/test/files/run/bug1373.scala +++ b/test/files/run/bug1373.scala @@ -1,6 +1,6 @@ // Testing whether case class params come back in the right order. -object Test extends Application { +object Test extends App { case class Foo(private val a: String, b: String, private val c: String, d: String, private val e: String) val x = Foo("a", "b", "c", "d", "e") assert(x.toString == """Foo(a,b,c,d,e)""") -} \ No newline at end of file +} diff --git a/test/files/run/bug1466.scala b/test/files/run/bug1466.scala index fdbb5cb91d..c59a388590 100644 --- a/test/files/run/bug1466.scala +++ b/test/files/run/bug1466.scala @@ -6,6 +6,6 @@ object IOvervalueMyPrivacy { } } -object Test extends Application { +object Test extends App { assert(IOvervalueMyPrivacy.go == 6) } diff --git a/test/files/run/bug1766.scala b/test/files/run/bug1766.scala index 901f9ae664..638384d4f9 100644 --- a/test/files/run/bug1766.scala +++ b/test/files/run/bug1766.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { class C(s: String) { diff --git a/test/files/run/bug2075.scala b/test/files/run/bug2075.scala index f328faddcb..e3a68e4a83 100644 --- a/test/files/run/bug2075.scala +++ b/test/files/run/bug2075.scala @@ -1,7 +1,7 @@ -object Test extends Application { +object Test extends App { var tm = new scala.collection.immutable.TreeMap[Int,Int] for (i <- 0 to 100) tm = tm.insert(i, i) tm.keySet.filter(_ < 40) -} \ No newline at end of file +} diff --git a/test/files/run/bug216.scala b/test/files/run/bug216.scala index b046f51f47..916a3c582b 100644 --- a/test/files/run/bug216.scala +++ b/test/files/run/bug216.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { object m { val f = { x: Unit => () } Console.println("OK") diff --git a/test/files/run/bug2241.scala b/test/files/run/bug2241.scala index 53a0d708e8..4a8a662b85 100644 --- a/test/files/run/bug2241.scala +++ b/test/files/run/bug2241.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def f(a:Array[Int]) = a match { case Array(1, _*) => "yes" case _ => "no" diff --git a/test/files/run/bug2276.scala b/test/files/run/bug2276.scala index 25c30d9e96..ed5714e9fa 100644 --- a/test/files/run/bug2276.scala +++ b/test/files/run/bug2276.scala @@ -1,7 +1,7 @@ import scala.xml._ import scala.xml.transform._ -object Test extends Application { +object Test extends App { val inputXml : Node = diff --git a/test/files/run/bug2552.scala b/test/files/run/bug2552.scala index 911d98decc..0c6b4f005b 100644 --- a/test/files/run/bug2552.scala +++ b/test/files/run/bug2552.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def testTakeWhile = { val numbers = Iterator.range(0, 50) val zeroTo9 = numbers.takeWhile(x => { println("p(" + x + ")"); x < 10 } ) diff --git a/test/files/run/bug298.scala b/test/files/run/bug298.scala index c6179f1b2e..bfc219ec5a 100644 --- a/test/files/run/bug298.scala +++ b/test/files/run/bug298.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { implicit def anyList[T]: List[T] = Nil implicit def intList: List[Int] = 42::24::Nil @@ -14,4 +14,4 @@ object Test extends Application { val t = foo[List[Tuple2[Int,Int]]] println(t) // incorrect - prints "List()" -} \ No newline at end of file +} diff --git a/test/files/run/bug405.scala b/test/files/run/bug405.scala index a1e3864496..e736fc1e57 100644 --- a/test/files/run/bug405.scala +++ b/test/files/run/bug405.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val x = M; object M; assert(x eq M) diff --git a/test/files/run/bug657.scala b/test/files/run/bug657.scala index 931f62b1a5..a9726092e7 100644 --- a/test/files/run/bug657.scala +++ b/test/files/run/bug657.scala @@ -44,7 +44,7 @@ class Test1 extends OffsetList with Matcher { type Matchable = MatchableImpl; } -object Test extends Application { +object Test extends App { val test = new Test1; val m = new test.MatchableImpl; m.chop; diff --git a/test/files/run/bug889.scala b/test/files/run/bug889.scala index db6076e8e2..c2c1730811 100644 --- a/test/files/run/bug889.scala +++ b/test/files/run/bug889.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val a = List("a") diff --git a/test/files/run/bug949.scala b/test/files/run/bug949.scala index 216e92a1c6..a9c5d08c50 100644 --- a/test/files/run/bug949.scala +++ b/test/files/run/bug949.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { private def f = new T { val state = State.A } diff --git a/test/files/run/bug978.scala b/test/files/run/bug978.scala index a2df87b0ed..3ffac92761 100644 --- a/test/files/run/bug978.scala +++ b/test/files/run/bug978.scala @@ -8,7 +8,7 @@ class Foo(val n: Int) { override def toString = "" + n } -object Test extends Application { +object Test extends App { val set = new collection.mutable.HashSet[Foo] // val set = new collection.jcl.HashSet[Foo] diff --git a/test/files/run/byname.scala b/test/files/run/byname.scala index af545d5e7d..8aff1ec23f 100644 --- a/test/files/run/byname.scala +++ b/test/files/run/byname.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def test[A](name: String, expect: A, actual: => A) { if (expect != actual) throw new AssertionError("test " + name + " failed") diff --git a/test/files/run/caseclasses.scala b/test/files/run/caseclasses.scala index ed5643a709..5aafea59e3 100644 --- a/test/files/run/caseclasses.scala +++ b/test/files/run/caseclasses.scala @@ -15,7 +15,7 @@ object M { } } -object Test extends Application { +object Test extends App { def Abs(x: Int) = new Abs(x * 2){} Abs(2) match { diff --git a/test/files/run/castsingleton.scala b/test/files/run/castsingleton.scala index f907467741..339f5e00cf 100644 --- a/test/files/run/castsingleton.scala +++ b/test/files/run/castsingleton.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { case class L(); object N extends L(); diff --git a/test/files/run/checked.scala b/test/files/run/checked.scala index adb0c509a5..e4db9c0916 100644 --- a/test/files/run/checked.scala +++ b/test/files/run/checked.scala @@ -90,7 +90,7 @@ class TestInterference extends { } -object Test extends Application { +object Test extends App { def shouldThrow(t: => Unit) = try { t diff --git a/test/files/run/collections.scala b/test/files/run/collections.scala index f286123322..deab5aa210 100644 --- a/test/files/run/collections.scala +++ b/test/files/run/collections.scala @@ -1,7 +1,7 @@ import collection._ import scala.compat.Platform.currentTime -object Test extends Application { +object Test extends App { val printTime = false diff --git a/test/files/run/colltest.scala b/test/files/run/colltest.scala index b635c4e531..ecd234bdd1 100644 --- a/test/files/run/colltest.scala +++ b/test/files/run/colltest.scala @@ -45,7 +45,7 @@ class TestSet(s0: Set[Int], s1: Set[Int]) { } Console.println("succeeded for "+Iterations+" iterations.") } -object Test extends Application { +object Test extends App { def t3954 { import scala.collection.mutable import scala.collection.immutable diff --git a/test/files/run/colltest1.scala b/test/files/run/colltest1.scala index dd9ecdbd5e..0e4c7e574c 100644 --- a/test/files/run/colltest1.scala +++ b/test/files/run/colltest1.scala @@ -1,6 +1,6 @@ import collection._ -object Test extends Application { +object Test extends App { def orderedTraversableTest(empty: Traversable[Int]) { println("new test starting with "+empty) diff --git a/test/files/run/complicatedmatch.scala b/test/files/run/complicatedmatch.scala index c837c328b3..681029aa13 100644 --- a/test/files/run/complicatedmatch.scala +++ b/test/files/run/complicatedmatch.scala @@ -6,7 +6,7 @@ object Even{ def unapply(x : Int) = if (x % 2 == 0) Some(x / 2) else None; } -object Test extends Application{ +object Test extends App{ val LongWord = "supercalifragilisticexpialadocious"; def foo(x : Int, y : String) : Int = (x, y) match { diff --git a/test/files/run/contrib674.scala b/test/files/run/contrib674.scala index 5e43560b79..f6b46d13c6 100644 --- a/test/files/run/contrib674.scala +++ b/test/files/run/contrib674.scala @@ -1,6 +1,6 @@ // causes VerifyError with scala-2.5.1 -object Test extends Application { +object Test extends App { def bad() { try { 1 diff --git a/test/files/run/ctor-order.scala b/test/files/run/ctor-order.scala index 44e981e413..5f5871691a 100644 --- a/test/files/run/ctor-order.scala +++ b/test/files/run/ctor-order.scala @@ -21,7 +21,7 @@ class Outer { } -object Test extends AnyRef with Application { +object Test extends AnyRef with App { val o = new Outer; new o.X; diff --git a/test/files/run/exc.scala b/test/files/run/exc.scala index 4c7db29226..6457af1e14 100644 --- a/test/files/run/exc.scala +++ b/test/files/run/exc.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def foo() = { while (true) { try { diff --git a/test/files/run/exc1.scala b/test/files/run/exc1.scala index 24856247bf..9008f9d149 100644 --- a/test/files/run/exc1.scala +++ b/test/files/run/exc1.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def foo(): Unit = { while (true) { try { diff --git a/test/files/run/exc2.scala b/test/files/run/exc2.scala index 00a269a364..bb41f5286c 100644 --- a/test/files/run/exc2.scala +++ b/test/files/run/exc2.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def foo() = { while (true) { try { diff --git a/test/files/run/exceptions-nest.scala b/test/files/run/exceptions-nest.scala index d3f37452b5..841e6b1c67 100644 --- a/test/files/run/exceptions-nest.scala +++ b/test/files/run/exceptions-nest.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { println(test1) println(test2) diff --git a/test/files/run/existentials.scala b/test/files/run/existentials.scala index 902ae31b5a..ff52cc0040 100644 --- a/test/files/run/existentials.scala +++ b/test/files/run/existentials.scala @@ -50,7 +50,7 @@ object Bug1189 { println(f(x)) } -object Test extends Application { +object Test extends App { val x = { class I; class J; (new C(new I), new C(new J)) } val y: (C[X], C[Y]) forSome { type X; type Y } = x diff --git a/test/files/run/exoticnames.scala b/test/files/run/exoticnames.scala index 9250d62dd0..fa0e5e6ec5 100644 --- a/test/files/run/exoticnames.scala +++ b/test/files/run/exoticnames.scala @@ -1,5 +1,5 @@ // this is a run-test because the compiler should emit bytecode that'll pass the JVM's verifier -object Test extends Application { +object Test extends App { def `(` = error("bla") def `.` = error("bla") def `)` = error("bla") diff --git a/test/files/run/finally.scala b/test/files/run/finally.scala index 6d8d360d30..e4715c59ae 100644 --- a/test/files/run/finally.scala +++ b/test/files/run/finally.scala @@ -1,6 +1,6 @@ // test that finally is not covered by any exception handlers. -object Test extends Application { +object Test extends App { def bar { try { println("hi") diff --git a/test/files/run/fors.scala b/test/files/run/fors.scala index 2cd4cf135c..c7682f563d 100644 --- a/test/files/run/fors.scala +++ b/test/files/run/fors.scala @@ -4,7 +4,7 @@ //############################################################################ -object Test extends Application { +object Test extends App { val xs = List(1, 2, 3) val ys = List('a, 'b, 'c) diff --git a/test/files/run/gadts.scala b/test/files/run/gadts.scala index 11b094d99a..57c7fc8af0 100644 --- a/test/files/run/gadts.scala +++ b/test/files/run/gadts.scala @@ -6,7 +6,7 @@ case class If[T](c: Term[Boolean], t1: Term[T], t2: Term[T]) extends Term[T] -object Test extends Application { +object Test extends App { def eval[T](t: Term[T]): T = t match { case Lit(n) => n case Succ(u) => eval(u) + 1 diff --git a/test/files/run/implicits.scala b/test/files/run/implicits.scala index e554575284..a30f60f6d0 100644 --- a/test/files/run/implicits.scala +++ b/test/files/run/implicits.scala @@ -15,7 +15,7 @@ class C(x: String) { } } -object Test extends Application { +object Test extends App { import A.B._ val c = new C("OK") val i = new c.Inner diff --git a/test/files/run/infiniteloop.scala b/test/files/run/infiniteloop.scala index f15674a676..06926cec1e 100644 --- a/test/files/run/infiniteloop.scala +++ b/test/files/run/infiniteloop.scala @@ -1,6 +1,6 @@ /** Tests the optimiser (not to loop on 'reverse'). */ -object Test extends Application { +object Test extends App { def foo { val s3 = Stream.range(1, 1000) //100000 (ticket #153: Stackoverflow) diff --git a/test/files/run/infix.scala b/test/files/run/infix.scala index 60a844acad..ba77480297 100644 --- a/test/files/run/infix.scala +++ b/test/files/run/infix.scala @@ -2,7 +2,7 @@ case class op(x: op, y: Int, z: Int) { def op(y: Int, z: Int) = new op(this, y, z) } -object Test extends Application { +object Test extends App { val xs = new op(null, 0, 0) op (1, 1) op (2, 2) Console.println(xs) xs match { diff --git a/test/files/run/inliner-infer.scala b/test/files/run/inliner-infer.scala index 107b9508ee..027d25b6e2 100644 --- a/test/files/run/inliner-infer.scala +++ b/test/files/run/inliner-infer.scala @@ -3,7 +3,7 @@ /** Test that the inliner is not inferring that `xs' is * always Nil, removing the call to isEmpty. */ -object Test extends Application { +object Test extends App { @annotation.tailrec def walk(xs: MyList): Unit = { diff --git a/test/files/run/intmap.scala b/test/files/run/intmap.scala index 8c3e0b2ca3..c5f8d7d3d1 100644 --- a/test/files/run/intmap.scala +++ b/test/files/run/intmap.scala @@ -1,4 +1,4 @@ -object Test extends Application{ +object Test extends App{ import scala.collection.immutable.IntMap; val it = IntMap(8 -> 2, 11 -> 3, 1 -> 2, 7 -> 13); diff --git a/test/files/run/issue192.scala b/test/files/run/issue192.scala index 55130072b7..8acd3a6345 100644 --- a/test/files/run/issue192.scala +++ b/test/files/run/issue192.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def f1(p: Any{def unary_+ : Int}) = +p def f2(p: Any{def unary_- : Int}) = -p diff --git a/test/files/run/iterables.scala b/test/files/run/iterables.scala index 5334b456ff..ad30f47316 100644 --- a/test/files/run/iterables.scala +++ b/test/files/run/iterables.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { class Test(n: Int) extends Iterable[Int] { private var i = 0 def iterator = new Iterator[Int] { diff --git a/test/files/run/json.scala b/test/files/run/json.scala index 1e0b5be94b..7b2b80718c 100644 --- a/test/files/run/json.scala +++ b/test/files/run/json.scala @@ -1,7 +1,7 @@ import scala.util.parsing.json._ import scala.collection.immutable.TreeMap -object Test extends Application { +object Test extends App { /* This method converts parsed JSON back into real JSON notation with objects in * sorted-key order. Not required by the spec, but it allows us to to a stable * toString comparison. */ diff --git a/test/files/run/lazy-exprs.scala b/test/files/run/lazy-exprs.scala index 8a80423646..204c4b564b 100644 --- a/test/files/run/lazy-exprs.scala +++ b/test/files/run/lazy-exprs.scala @@ -89,7 +89,7 @@ object TestExpressions { } -object Test extends Application { +object Test extends App { TestExpressions.test } diff --git a/test/files/run/lazy-leaks.scala b/test/files/run/lazy-leaks.scala index e7073b5b60..e3db55aa09 100644 --- a/test/files/run/lazy-leaks.scala +++ b/test/files/run/lazy-leaks.scala @@ -2,7 +2,7 @@ class Lazy(f: => Int) { lazy val get: Int = f } -object Test extends Application +object Test extends App { val buffer = new scala.collection.mutable.ListBuffer[Lazy] diff --git a/test/files/run/lazy-locals.scala b/test/files/run/lazy-locals.scala index 15e02dbaf0..ba555daf95 100644 --- a/test/files/run/lazy-locals.scala +++ b/test/files/run/lazy-locals.scala @@ -1,5 +1,5 @@ -object Test extends Application { +object Test extends App { lazy val w = 10 diff --git a/test/files/run/lazy-override-run.scala b/test/files/run/lazy-override-run.scala index e5884257a8..6016c3c8be 100644 --- a/test/files/run/lazy-override-run.scala +++ b/test/files/run/lazy-override-run.scala @@ -13,7 +13,7 @@ class B extends A { -object Test extends Application { +object Test extends App { val a = new A print("a.x=") println(a.x) diff --git a/test/files/run/lazy-traits.scala b/test/files/run/lazy-traits.scala index 5a8d3f3db7..38207672db 100644 --- a/test/files/run/lazy-traits.scala +++ b/test/files/run/lazy-traits.scala @@ -153,7 +153,7 @@ class MixedUnitLazy extends UnitLazy with UnitLazyT { } } -object Test extends Application { +object Test extends App { def test(name: String, v: A) { println(name + " test:") diff --git a/test/files/run/map_test.scala b/test/files/run/map_test.scala index 4358878a81..9f83a3f49a 100644 --- a/test/files/run/map_test.scala +++ b/test/files/run/map_test.scala @@ -1,6 +1,6 @@ import scala.collection.immutable.{ListMap, Map, TreeMap} -object Test extends Application { +object Test extends App { test1() test2() println("OK") diff --git a/test/files/run/matcharraytail.scala b/test/files/run/matcharraytail.scala index 0ee95bc014..24a8dd12b2 100644 --- a/test/files/run/matcharraytail.scala +++ b/test/files/run/matcharraytail.scala @@ -1,4 +1,4 @@ -object Test extends Application{ +object Test extends App{ Array("foo", "bar", "baz") match { case x@Array("foo", bar @_*) => println(x.deep.toString); println(bar.toString); case Array(x, y, z) => println("shouldn't have fallen through"); diff --git a/test/files/run/matchbytes.scala b/test/files/run/matchbytes.scala index 73e55d47cb..f2cea06eb3 100644 --- a/test/files/run/matchbytes.scala +++ b/test/files/run/matchbytes.scala @@ -1,4 +1,4 @@ -object Test extends Application{ +object Test extends App{ val x = (1 : Byte) match { case 2 => println(2); case 1 => println(1); diff --git a/test/files/run/matchemptyarray.scala b/test/files/run/matchemptyarray.scala index a7147f29f6..1fa53b4829 100644 --- a/test/files/run/matchemptyarray.scala +++ b/test/files/run/matchemptyarray.scala @@ -1,4 +1,4 @@ -object Test extends Application{ +object Test extends App{ Array[String]() match { case x@Array() => println(x.deep.toString()); } diff --git a/test/files/run/matchintasany.scala b/test/files/run/matchintasany.scala index 2c732b98b5..03f6ca2a84 100644 --- a/test/files/run/matchintasany.scala +++ b/test/files/run/matchintasany.scala @@ -1,4 +1,4 @@ -object Test extends Application{ +object Test extends App{ val x = (1 : Any) match { case 0xFFFFFFFF00000001L => println("Oops, overflow!"); case 2L => println(2); diff --git a/test/files/run/matchonstream.scala b/test/files/run/matchonstream.scala index d38d81d9fc..c9bfefc216 100644 --- a/test/files/run/matchonstream.scala +++ b/test/files/run/matchonstream.scala @@ -1,3 +1,3 @@ -object Test extends Application{ +object Test extends App{ Stream.from(1) match { case Stream(1, 2, x @_*) => println("It worked!") } } diff --git a/test/files/run/missingparams.scala b/test/files/run/missingparams.scala index 3672fdf76f..fbc4d2a4f7 100644 --- a/test/files/run/missingparams.scala +++ b/test/files/run/missingparams.scala @@ -13,7 +13,7 @@ final class Foo(val x: Int) { } } -object Test extends Application { +object Test extends App { val foo1 = new Foo(42) val foo2 = new Foo(-42) diff --git a/test/files/run/multi-array.scala b/test/files/run/multi-array.scala index 42f64751fd..4f3a8d305f 100644 --- a/test/files/run/multi-array.scala +++ b/test/files/run/multi-array.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val a = Array(1, 2, 3) println(a.deepToString) diff --git a/test/files/run/names-defaults.scala b/test/files/run/names-defaults.scala index 63f7950d61..2d1d7417e4 100644 --- a/test/files/run/names-defaults.scala +++ b/test/files/run/names-defaults.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def get[T](x: T) = { println("get: "+ x); x } // TESTS diff --git a/test/files/run/packrat1.scala b/test/files/run/packrat1.scala index 26fa8e76f2..3c3ea07afb 100644 --- a/test/files/run/packrat1.scala +++ b/test/files/run/packrat1.scala @@ -6,7 +6,7 @@ import scala.util.parsing.syntax._ import scala.collection.mutable.HashMap -object Test extends Application{ +object Test extends App{ import grammars._ val head = phrase(term) diff --git a/test/files/run/packrat2.scala b/test/files/run/packrat2.scala index e5c8db0f50..c25e5e9a85 100644 --- a/test/files/run/packrat2.scala +++ b/test/files/run/packrat2.scala @@ -6,7 +6,7 @@ import scala.util.parsing.syntax._ import scala.collection.mutable.HashMap -object Test extends Application{ +object Test extends App{ import grammars2._ val head = phrase(exp) diff --git a/test/files/run/preinits.scala b/test/files/run/preinits.scala index 8de43b62ea..6566c4086b 100644 --- a/test/files/run/preinits.scala +++ b/test/files/run/preinits.scala @@ -1,6 +1,6 @@ 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 { +object Test extends B with C with App { println(x) } diff --git a/test/files/run/proxy.scala b/test/files/run/proxy.scala index 48192a7a79..6f9e83c7f1 100644 --- a/test/files/run/proxy.scala +++ b/test/files/run/proxy.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val p = new Proxy { def self = 2 } diff --git a/test/files/run/randomAccessSeq-apply.scala b/test/files/run/randomAccessSeq-apply.scala index 1f74050bb7..9097038c51 100644 --- a/test/files/run/randomAccessSeq-apply.scala +++ b/test/files/run/randomAccessSeq-apply.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val empty = RandomAccessSeq() assert(empty.isEmpty) diff --git a/test/files/run/runtime-richChar.scala b/test/files/run/runtime-richChar.scala index b2c488983d..dceb70e74d 100644 --- a/test/files/run/runtime-richChar.scala +++ b/test/files/run/runtime-richChar.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def testSeq(name: String, expected: Seq[Char], got: Seq[Char]) { if (expected.toList == got.toList) println(name + " ok") diff --git a/test/files/run/slices.scala b/test/files/run/slices.scala index 9c76572bfb..e31ea4046f 100644 --- a/test/files/run/slices.scala +++ b/test/files/run/slices.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { // lists println(List(1, 2, 3, 4).slice(1, 2)) diff --git a/test/files/run/sort.scala b/test/files/run/sort.scala index 899fea551e..b89ff22f54 100644 --- a/test/files/run/sort.scala +++ b/test/files/run/sort.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { println((1 to 100000).toList.sort(_<_).length) println(List(1, 5, 10, 3, 2).toList.sort(_<_)) println(List(1, 5, 10, 3, 2).toList.sort(_>_)) diff --git a/test/files/run/stream_flatmap_odds.scala b/test/files/run/stream_flatmap_odds.scala index ed1a537bd9..6fb202ca68 100644 --- a/test/files/run/stream_flatmap_odds.scala +++ b/test/files/run/stream_flatmap_odds.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { lazy val odds: Stream[Int] = Stream(1) append ( odds flatMap {x => Stream(x + 2)} ) println(odds take 42 force) -} \ No newline at end of file +} diff --git a/test/files/run/streams.scala b/test/files/run/streams.scala index 83b7772886..edf7ae368e 100644 --- a/test/files/run/streams.scala +++ b/test/files/run/streams.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val s0: Stream[Int] = Stream.empty println(s0.take(1)) println(s0.takeWhile(_ > 0)) diff --git a/test/files/run/stringbuilder.scala b/test/files/run/stringbuilder.scala index 28ddc653a5..cc3eb032dc 100644 --- a/test/files/run/stringbuilder.scala +++ b/test/files/run/stringbuilder.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val str = "ABCDEFGHIJKLMABCDEFGHIJKLM" val surrogateStr = "an old Turkic letter: \uD803\uDC22" diff --git a/test/files/run/structural.scala b/test/files/run/structural.scala index 5fc2292b42..97627b8da1 100644 --- a/test/files/run/structural.scala +++ b/test/files/run/structural.scala @@ -193,7 +193,7 @@ object test4 { } -object Test extends Application { +object Test extends App { test1 test2 test3 diff --git a/test/files/run/t0017.scala b/test/files/run/t0017.scala index f43481f39b..e2a43a66ac 100644 --- a/test/files/run/t0017.scala +++ b/test/files/run/t0017.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def transpose[A](arr: Array[Array[A]]) = { for (i <- Array.range(0, arr(0).length)) yield diff --git a/test/files/run/t0042.scala b/test/files/run/t0042.scala index 53314f2885..aa4a74d2f8 100644 --- a/test/files/run/t0042.scala +++ b/test/files/run/t0042.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def getClause[T](clauses: List[T]): Option[T] = { for (c <- clauses) { return Some(c) diff --git a/test/files/run/t0412.scala b/test/files/run/t0412.scala index f1ca7379ae..873fbb1eb4 100644 --- a/test/files/run/t0412.scala +++ b/test/files/run/t0412.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { println(classOf[java.util.ArrayList[_]]) println(classOf[java.util.ArrayList[T] forSome { type T }]) } diff --git a/test/files/run/t0421.scala b/test/files/run/t0421.scala index b69373f341..90adb31c4f 100644 --- a/test/files/run/t0421.scala +++ b/test/files/run/t0421.scala @@ -1,5 +1,5 @@ // ticket #421 -object Test extends Application { +object Test extends App { def transpose[A: ClassManifest](xss: Array[Array[A]]) = { for (i <- Array.range(0, xss(0).length)) yield diff --git a/test/files/run/t0486.scala b/test/files/run/t0486.scala index 9cedecc095..d3ed8f4225 100644 --- a/test/files/run/t0486.scala +++ b/test/files/run/t0486.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { import scala.xml._ def wsdlTemplate1(serviceName: String): Node = diff --git a/test/files/run/t0508.scala b/test/files/run/t0508.scala index 7ef6f8197f..2283c46c36 100644 --- a/test/files/run/t0508.scala +++ b/test/files/run/t0508.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { case class Foo(s: String, n: Int) diff --git a/test/files/run/t0528.scala b/test/files/run/t0528.scala index df6d13a17a..a76f602ed3 100644 --- a/test/files/run/t0528.scala +++ b/test/files/run/t0528.scala @@ -7,7 +7,7 @@ class RichStr extends Sequ[Char] { def toArray: Array[Char] = Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') } -object Test extends Application { +object Test extends App { val x: RichStr = new RichStr println((x: Sequ[Char]).toArray.deep) // calling through the bridge misses unboxing diff --git a/test/files/run/t0607.scala b/test/files/run/t0607.scala index 5601494dec..b07fdcd490 100644 --- a/test/files/run/t0607.scala +++ b/test/files/run/t0607.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { case class A() class B extends A() { override def toString() = "B()" } println(A()) diff --git a/test/files/run/t0631.scala b/test/files/run/t0631.scala index e64301e514..c401ed31cb 100644 --- a/test/files/run/t0631.scala +++ b/test/files/run/t0631.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { class Foo { override def equals(that: Any) = { println("Foo.equals called") diff --git a/test/files/run/t0663.scala b/test/files/run/t0663.scala index 16a5a48330..dd0326d4e3 100644 --- a/test/files/run/t0663.scala +++ b/test/files/run/t0663.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val src = scala.io.Source.fromString("") val parser = xml.parsing.ConstructingParser.fromSource(src, true) println(parser.document) diff --git a/test/files/run/t0668.scala b/test/files/run/t0668.scala index 2f1eaba0d9..98ecb554c7 100644 --- a/test/files/run/t0668.scala +++ b/test/files/run/t0668.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val ints: Array[Int] = Array(1, 2, 3) ints.toArray } diff --git a/test/files/run/t0677.scala b/test/files/run/t0677.scala index eb01a85fcb..65448ed42c 100644 --- a/test/files/run/t0677.scala +++ b/test/files/run/t0677.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { class X[T: ClassManifest] { val a = new Array[Array[T]](3,4) val b = Array.ofDim[T](3, 4) diff --git a/test/files/run/t0807.scala b/test/files/run/t0807.scala index e69aa1c71c..1e2a26664a 100644 --- a/test/files/run/t0807.scala +++ b/test/files/run/t0807.scala @@ -1,5 +1,5 @@ trait A trait B extends A { val x = println("early") } -object Test extends Application { +object Test extends App { new B {} } diff --git a/test/files/run/t0883.scala b/test/files/run/t0883.scala index c5c1aeaa04..c8ed06dbfe 100644 --- a/test/files/run/t0883.scala +++ b/test/files/run/t0883.scala @@ -2,7 +2,7 @@ object Foo { def apply(x: String) = new Foo(x) } class Foo(name: String) case object Bar extends Foo("Bar") case class Baz() extends Foo("Baz") -object Test extends Application { +object Test extends App { Foo("Bar") match { case Bar => println("What?") case _ => println("OK") diff --git a/test/files/run/t0911.scala b/test/files/run/t0911.scala index 6f9ad91781..be8c5de1dc 100644 --- a/test/files/run/t0911.scala +++ b/test/files/run/t0911.scala @@ -4,6 +4,6 @@ class IP extends { val baz = "bar"; } with Foo(() => baz); -object Test extends Application{ +object Test extends App{ (new IP).bar(); } diff --git a/test/files/run/t0936.scala b/test/files/run/t0936.scala index 3a7535a5d8..e3470a2480 100644 --- a/test/files/run/t0936.scala +++ b/test/files/run/t0936.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def foo = { abstract class MouseEventType { def x: String } diff --git a/test/files/run/t1167.scala b/test/files/run/t1167.scala index 7386d09a6c..3dd0a30c00 100644 --- a/test/files/run/t1167.scala +++ b/test/files/run/t1167.scala @@ -23,7 +23,7 @@ abstract class Foo { } } -object Test extends Application { +object Test extends App { val foo = new Foo {} val bar = new foo.Bar {} println(foo) diff --git a/test/files/run/t1323.scala b/test/files/run/t1323.scala index 89676c888b..94b51bd2a4 100644 --- a/test/files/run/t1323.scala +++ b/test/files/run/t1323.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { println(" 1:" + List(1,2,3,4).indexOfSlice(List(0,1))) // -1 println(" 2:" + List(1,2,3,4).indexOfSlice(List(1,2))) // 0 println(" 3:" + List(1,2,3,4).indexOfSlice(List(2,3))) // 1 diff --git a/test/files/run/t1368.scala b/test/files/run/t1368.scala index c9b2297203..04e9195d3e 100644 --- a/test/files/run/t1368.scala +++ b/test/files/run/t1368.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { trait Happy { val status = "happy" } trait Sad { val status = "sad" } diff --git a/test/files/run/t1423.scala b/test/files/run/t1423.scala index 83c35a46bd..073483aeee 100644 --- a/test/files/run/t1423.scala +++ b/test/files/run/t1423.scala @@ -1,4 +1,4 @@ -object Test extends Application{ +object Test extends App{ val x = 1 match { case 0xFFFFFFFF00000001L => println("Oops, overflow!"); case 2L => println(2); diff --git a/test/files/run/t1505.scala b/test/files/run/t1505.scala index fdcd4f3fb3..a246e8a35b 100644 --- a/test/files/run/t1505.scala +++ b/test/files/run/t1505.scala @@ -10,7 +10,7 @@ object R extends Enumeration { val A, B, C = Value } -object Test extends Application { +object Test extends App { assert(P(0) == P.withName("A")) assert(P.C == P.withName("C")) diff --git a/test/files/run/t1524.scala b/test/files/run/t1524.scala index 3b06afdbfd..8a1fb7d5c0 100644 --- a/test/files/run/t1524.scala +++ b/test/files/run/t1524.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val buf = new scala.collection.mutable.ArrayBuffer[String](0) buf += "initial" diff --git a/test/files/run/t153.scala b/test/files/run/t153.scala index 359e40407b..82492fdbe6 100644 --- a/test/files/run/t153.scala +++ b/test/files/run/t153.scala @@ -1,5 +1,5 @@ -object Test extends Application { +object Test extends App { def powers(x: Int) = if ((x&(x-1))==0) Some(x) else None val res = (Stream.range(1, 500000) flatMap powers).reverse println(res take 42 force) -} \ No newline at end of file +} diff --git a/test/files/run/t1535.scala b/test/files/run/t1535.scala index d0ae4814f4..b0163a9710 100644 --- a/test/files/run/t1535.scala +++ b/test/files/run/t1535.scala @@ -8,7 +8,7 @@ class ClassDecl extends BlockStmt { lazy val y = true } -object Test extends Application { +object Test extends App { val n = new ClassDecl () println (n.x) println (n.y) diff --git a/test/files/run/t1537.scala b/test/files/run/t1537.scala index 9776f4a279..1dce501990 100644 --- a/test/files/run/t1537.scala +++ b/test/files/run/t1537.scala @@ -8,7 +8,7 @@ trait Evaluation { def equalInTrait = this.syntax.Foo == this.syntax.Foo } -object Test extends Evaluation with Application { +object Test extends Evaluation with App { object syntax extends Syntax def equalInObject = this.syntax.Foo == this.syntax.Foo diff --git a/test/files/run/t1591.scala b/test/files/run/t1591.scala index 434064a5dd..6dd9605042 100644 --- a/test/files/run/t1591.scala +++ b/test/files/run/t1591.scala @@ -8,7 +8,7 @@ abstract class A { } -object Test extends Application { +object Test extends App { val a = new A{} println(a.lazyBar.foo) } diff --git a/test/files/run/t1618.scala b/test/files/run/t1618.scala index 9f3ade6113..91f6de5874 100644 --- a/test/files/run/t1618.scala +++ b/test/files/run/t1618.scala @@ -1,5 +1,5 @@ -object Test extends Application { +object Test extends App { import scala.tools.nsc.io._ val dir: VirtualDirectory = new VirtualDirectory("foo", None) diff --git a/test/files/run/t1620.scala b/test/files/run/t1620.scala index ff25955eb7..e8ea06eb5f 100644 --- a/test/files/run/t1620.scala +++ b/test/files/run/t1620.scala @@ -2,7 +2,7 @@ import java.io.PrintWriter import scala.xml.XML import scala.xml.dtd.{DocType, PublicID} -object Test extends Application { +object Test extends App { val dt = DocType("foo", PublicID("-//Foo Corp//DTD 1.0//EN", "foo.dtd"), Seq()) val pw = new PrintWriter(System.out) XML.write(pw, , "utf-8", true, dt) diff --git a/test/files/run/t1718.scala b/test/files/run/t1718.scala index 61a17b2906..d1b19c38cd 100644 --- a/test/files/run/t1718.scala +++ b/test/files/run/t1718.scala @@ -1,4 +1,4 @@ -object Test extends Application{ +object Test extends App{ def matchesNull[T](mightBeNull: Array[T]): Boolean = mightBeNull match { case null => true case x => false diff --git a/test/files/run/t1747.scala b/test/files/run/t1747.scala index f7f54ee7dc..b11af6c023 100644 --- a/test/files/run/t1747.scala +++ b/test/files/run/t1747.scala @@ -3,4 +3,4 @@ object Foo extends Foo { } class Foo -object Test extends Application { Foo } +object Test extends App { Foo } diff --git a/test/files/run/t1773.scala b/test/files/run/t1773.scala index 4a4aaba1f0..7c95df62f8 100644 --- a/test/files/run/t1773.scala +++ b/test/files/run/t1773.scala @@ -1,4 +1,4 @@ -object Test extends Application +object Test extends App { val xs = List( , diff --git a/test/files/run/t1939.scala b/test/files/run/t1939.scala index 7d6261906c..7626e8bc1a 100644 --- a/test/files/run/t1939.scala +++ b/test/files/run/t1939.scala @@ -15,7 +15,7 @@ final class T2(_module: Module) extends T { def module = _module } -object Test extends Application { +object Test extends App { type mType = Module diff --git a/test/files/run/t2030.scala b/test/files/run/t2030.scala index 251ae2c622..2333c3981b 100644 --- a/test/files/run/t2030.scala +++ b/test/files/run/t2030.scala @@ -1,6 +1,6 @@ import scala.collection.immutable._ -object Test extends Application { +object Test extends App { val res0 = TreeSet(1, 2, 3, 4, 5, 6) val res1 = res0.map(x => x) println(res0.toList == res1.toList) diff --git a/test/files/run/t2111.scala b/test/files/run/t2111.scala index 3c6c5b8e8f..98177c4e21 100644 --- a/test/files/run/t2111.scala +++ b/test/files/run/t2111.scala @@ -1,5 +1,5 @@ -object Test extends Application { +object Test extends App { object Color extends Enumeration { val Red, Green, Blue = Value diff --git a/test/files/run/t2147.scala b/test/files/run/t2147.scala index 185e617d80..1a1dfddc71 100644 --- a/test/files/run/t2147.scala +++ b/test/files/run/t2147.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val s: Seq[Int] = Stream.from(1) val res0 = s.map(a => 2).head val res1 = Stream.from(1).flatMap(a => List(1)).head diff --git a/test/files/run/t2176.scala b/test/files/run/t2176.scala index f8b07271a1..2a46dcf2c4 100644 --- a/test/files/run/t2176.scala +++ b/test/files/run/t2176.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val res0 = Stream.cons(1, Stream.cons( { println("ouch"); 2 }, Stream.empty)) println(res0.take(1).force) } diff --git a/test/files/run/t2177.scala b/test/files/run/t2177.scala index fd1a29d198..5e344c654d 100644 --- a/test/files/run/t2177.scala +++ b/test/files/run/t2177.scala @@ -1,3 +1,3 @@ -object Test extends Application { +object Test extends App { println(Stream.from(1).take(5).mkString) } diff --git a/test/files/run/t2236.scala b/test/files/run/t2236.scala index 8e2b3900d4..64ed18c805 100755 --- a/test/files/run/t2236.scala +++ b/test/files/run/t2236.scala @@ -1,7 +1,7 @@ class T[A](implicit val m:Manifest[A]) class Foo class Bar extends T[Foo] -object Test extends Application { +object Test extends App { new Bar } diff --git a/test/files/run/t2255.scala b/test/files/run/t2255.scala index be800adf5a..0b34115ed2 100644 --- a/test/files/run/t2255.scala +++ b/test/files/run/t2255.scala @@ -1,3 +1,3 @@ -object Test extends Application { +object Test extends App { println(Stream.continually(Stream(1, 2, 3)).flatten.take(6).toList) } diff --git a/test/files/run/t2503.scala b/test/files/run/t2503.scala index 353a1dcac8..21801e2dbd 100755 --- a/test/files/run/t2503.scala +++ b/test/files/run/t2503.scala @@ -13,7 +13,7 @@ trait SB[A] extends Buffer[A] { } } -object Test extends Application { +object Test extends App { new ArrayBuffer[Int] with SB[Int] } diff --git a/test/files/run/t2788.scala b/test/files/run/t2788.scala index 7cc5031a59..b1596d5823 100644 --- a/test/files/run/t2788.scala +++ b/test/files/run/t2788.scala @@ -1,3 +1,3 @@ -object Test extends Application { +object Test extends App { println(Array(Some(1), None, Some(2)).flatten.toList) -} \ No newline at end of file +} diff --git a/test/files/run/t2813.2.scala b/test/files/run/t2813.2.scala index 4d37f5e69d..9a9a79da4d 100644 --- a/test/files/run/t2813.2.scala +++ b/test/files/run/t2813.2.scala @@ -1,7 +1,7 @@ import java.util.LinkedList import collection.JavaConversions._ -object Test extends Application { +object Test extends App { def assertListEquals[A](expected: List[A], actual: Seq[A]) { assert(expected.sameElements(actual), "Expected list to contain " + expected.mkString("[", ", ", "]") + diff --git a/test/files/run/t2857.scala b/test/files/run/t2857.scala index bd0d6fde16..c523227c4f 100644 --- a/test/files/run/t2857.scala +++ b/test/files/run/t2857.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { import collection.mutable._ val m = new HashMap[Int, Set[String]] with MultiMap[Int, String] m.addBinding(6, "Foo") diff --git a/test/files/run/t3038.scala b/test/files/run/t3038.scala index cf26001beb..7eb69f7fb5 100644 --- a/test/files/run/t3038.scala +++ b/test/files/run/t3038.scala @@ -62,7 +62,7 @@ class C extends A { } } -object Test extends Application { +object Test extends App { (new C).run } diff --git a/test/files/run/t3038b.scala b/test/files/run/t3038b.scala index 0b9731f52a..1527d64ebc 100644 --- a/test/files/run/t3038b.scala +++ b/test/files/run/t3038b.scala @@ -15,6 +15,6 @@ class A { } } -object Test extends Application { +object Test extends App { new A().run } diff --git a/test/files/run/t3186.scala b/test/files/run/t3186.scala index 2534d4a164..09de1a5ce0 100644 --- a/test/files/run/t3186.scala +++ b/test/files/run/t3186.scala @@ -2,6 +2,6 @@ object Dist1 extends Enumeration { val Mile, Foot, Inch = Value } object Dist2 extends Enumeration { val Kilometer, Millimeter, Parsec = Value } -object Test extends Application { +object Test extends App { println(Dist1.Mile == Dist2.Kilometer) } diff --git a/test/files/run/t3361.scala b/test/files/run/t3361.scala index 3e6fc30c8f..17af89a67c 100644 --- a/test/files/run/t3361.scala +++ b/test/files/run/t3361.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { import scala.collection.mutable.DoubleLinkedList empty diff --git a/test/files/run/t3619.scala b/test/files/run/t3619.scala index 0aef17dfdf..3f4c56ea53 100644 --- a/test/files/run/t3619.scala +++ b/test/files/run/t3619.scala @@ -1,6 +1,6 @@ class Dep(x: Int)(implicit val nameClash: String) -object Test extends Application { +object Test extends App { implicit val nameClash: String = "meh" def meth(implicit w: String) = 1 @@ -31,4 +31,4 @@ object Test extends Application { this(Meh.this.nameClash, 1) } } -*/ \ No newline at end of file +*/ diff --git a/test/files/run/t3670.scala b/test/files/run/t3670.scala index a37c3a242c..97f1e8a79c 100644 --- a/test/files/run/t3670.scala +++ b/test/files/run/t3670.scala @@ -11,7 +11,7 @@ class C { } } -class M extends Application { +class M extends App { def foo { lazy val a = { lazy val b = 1 @@ -25,7 +25,7 @@ class M extends Application { } } -object Test extends Application { +object Test extends App { new C() new M().foo -} \ No newline at end of file +} diff --git a/test/files/run/t3687.scala b/test/files/run/t3687.scala index 25141f8a32..e26433beca 100644 --- a/test/files/run/t3687.scala +++ b/test/files/run/t3687.scala @@ -1,6 +1,6 @@ object t extends Enumeration { val a, b = Value } -object Test extends Application { +object Test extends App { println(t.values) println(t.values) } diff --git a/test/files/run/t3719.scala b/test/files/run/t3719.scala index 2436e0cdf6..01dc205545 100644 --- a/test/files/run/t3719.scala +++ b/test/files/run/t3719.scala @@ -12,7 +12,7 @@ object Days extends Enumeration { } } -object Test extends Application { +object Test extends App { def dayElementsShouldBeNamed(): List[String] = Days.values.toList.sorted.map(x => x.toString) diff --git a/test/files/run/t3726.scala b/test/files/run/t3726.scala index 5ceed5416e..02b262fdac 100644 --- a/test/files/run/t3726.scala +++ b/test/files/run/t3726.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { def test(f: () => Int) = { val x = f() 5 diff --git a/test/files/run/t3763.scala b/test/files/run/t3763.scala index c8462b7437..1ac3013c84 100644 --- a/test/files/run/t3763.scala +++ b/test/files/run/t3763.scala @@ -1,3 +1,3 @@ -object Test extends Application { +object Test extends App { val x = Array(Array(1), List(1)) } diff --git a/test/files/run/t3835.scala b/test/files/run/t3835.scala index 1f0e35a89a..49e591195f 100644 --- a/test/files/run/t3835.scala +++ b/test/files/run/t3835.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { println((1, 2, 3) match { case (r, \u03b8, \u03c6) => r + \u03b8 + \u03c6 }) println(1 match { case \u00e9 => \u00e9 }) } diff --git a/test/files/run/t3857.scala b/test/files/run/t3857.scala index 9cb44e7fe7..53afb33ba2 100644 --- a/test/files/run/t3857.scala +++ b/test/files/run/t3857.scala @@ -3,10 +3,10 @@ class ScalaGeneric { var s: java.util.Set[String] = _ } trait ScalaGeneric2Trait { var s: java.util.Set[String] = _ } class ScalaGeneric2 extends ScalaGeneric2Trait -object Test extends Application { +object Test extends App { println(classOf[ScalaGeneric].getDeclaredField("s").toGenericString) // java.util.Set ScalaGeneric.s println(classOf[ScalaGeneric2].getDeclaredField("s").toGenericString) // java.util.Set ScalaGeneric2.s -- should be same as above -} \ No newline at end of file +} diff --git a/test/files/run/t3950.scala b/test/files/run/t3950.scala index fe99a7cc6f..58466e13fb 100644 --- a/test/files/run/t3950.scala +++ b/test/files/run/t3950.scala @@ -10,7 +10,7 @@ object NegativeId extends Enumeration { } } -object Test extends Application { +object Test extends App { println(NegativeId.fromInt(-1)) println(NegativeId.fromInt(0)) println(NegativeId.fromInt(1)) diff --git a/test/files/run/t4024.scala b/test/files/run/t4024.scala index b822a7781c..4ab383ebc3 100644 --- a/test/files/run/t4024.scala +++ b/test/files/run/t4024.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val x = "abc" diff --git a/test/files/run/t4146.scala b/test/files/run/t4146.scala index 6c960fa3ff..a17de50ee1 100644 --- a/test/files/run/t4146.scala +++ b/test/files/run/t4146.scala @@ -1,7 +1,7 @@ -object bob extends Application { +object bob extends App { var name = "Bob" } -object Test extends Application { +object Test extends App { assert(bob.name == "Bob") } diff --git a/test/files/run/t498.scala b/test/files/run/t498.scala index 50be317c4c..b4ede951f0 100644 --- a/test/files/run/t498.scala +++ b/test/files/run/t498.scala @@ -1,5 +1,5 @@ -object Test extends Application { +object Test extends App { // the function passed to flatMap produces lots of empty streams, but this should not overflow the stack val res = Stream.from(1).flatMap(i => if (i < 3000) Stream.empty else List(1)) println(res take 42 force) -} \ No newline at end of file +} diff --git a/test/files/run/tailcalls.scala b/test/files/run/tailcalls.scala index 2d136b5708..333ec7c402 100644 --- a/test/files/run/tailcalls.scala +++ b/test/files/run/tailcalls.scala @@ -193,7 +193,7 @@ object FancyTailCalls { val f2 = new FancyTailCalls } -object PolyObject extends Application { +object PolyObject extends App { def tramp[A](x: Int): Int = if (x > 0) tramp[A](x - 1) diff --git a/test/files/run/tcpoly_monads.scala b/test/files/run/tcpoly_monads.scala index bcfe6d2363..e437010481 100644 --- a/test/files/run/tcpoly_monads.scala +++ b/test/files/run/tcpoly_monads.scala @@ -37,6 +37,6 @@ trait OptionMonad extends Monads { } } -object Test extends OptionMonad with Application { +object Test extends OptionMonad with App { Console.println((Some("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") >>= (x => Some(x.length))).get) } diff --git a/test/files/run/tcpoly_overriding.scala b/test/files/run/tcpoly_overriding.scala index 00ab580579..86ba89f530 100644 --- a/test/files/run/tcpoly_overriding.scala +++ b/test/files/run/tcpoly_overriding.scala @@ -11,6 +11,6 @@ class B extends A[List] { def b: List[Int] = List(1) } -object Test extends Application { +object Test extends App { Console.println((new B).b(0)) } diff --git a/test/files/run/tcpoly_parseridioms.scala b/test/files/run/tcpoly_parseridioms.scala index edc5d5cad8..741be05af1 100644 --- a/test/files/run/tcpoly_parseridioms.scala +++ b/test/files/run/tcpoly_parseridioms.scala @@ -104,6 +104,6 @@ trait ParserIdioms extends Parsers with Idioms { implicit def curry3[r,s,t,u](fun: (r,s, t)=>u)(a: r)(b: s)(c: t) = fun(a, b, c) } -object Test extends ParserIdioms with Application { +object Test extends ParserIdioms with App { println(expr("12".toList)) } diff --git a/test/files/run/try.scala b/test/files/run/try.scala index 594c630cc8..5545bcbec1 100644 --- a/test/files/run/try.scala +++ b/test/files/run/try.scala @@ -1,4 +1,4 @@ -object Test extends AnyRef with Application { +object Test extends AnyRef with App { val x = 1; def try1 = { diff --git a/test/files/run/tuples.scala b/test/files/run/tuples.scala index b32c856afe..4854e36c96 100644 --- a/test/files/run/tuples.scala +++ b/test/files/run/tuples.scala @@ -1,6 +1,6 @@ import Function._ -object Test extends Application { +object Test extends App { var xyz: (Int, String, Boolean) = _ xyz = (1, "abc", true) Console.println(xyz) diff --git a/test/files/run/typealias_overriding.scala b/test/files/run/typealias_overriding.scala index 60e783791d..4b6a0037ec 100644 --- a/test/files/run/typealias_overriding.scala +++ b/test/files/run/typealias_overriding.scala @@ -1,7 +1,7 @@ // this bug (http://scala-webapps.epfl.ch/bugtracking/bugs/displayItem.do?id=1065) // was caused by Uncurry not normalizing all the types // (more specifically the argument/return types of an anonymous Function) -object Test extends Application { +object Test extends App { trait AddRemove { type TNode <: NodeImpl; trait NodeImpl; diff --git a/test/files/run/unboxingBug.scala b/test/files/run/unboxingBug.scala index 62c2d20202..5f129b64b4 100644 --- a/test/files/run/unboxingBug.scala +++ b/test/files/run/unboxingBug.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { println(identity('a').toInt) println('a'.toInt) println(identity('a').asInstanceOf[Int]) diff --git a/test/files/run/viewtest.scala b/test/files/run/viewtest.scala index 833c0101e3..db9fc68bb4 100755 --- a/test/files/run/viewtest.scala +++ b/test/files/run/viewtest.scala @@ -1,5 +1,5 @@ import collection._ -object Test extends Application { +object Test extends App { val xs: SeqView[(String, Int), Seq[_]] = List("x").view.zip(Stream.from(0)) println(xs) diff --git a/test/files/run/weakconform.scala b/test/files/run/weakconform.scala index 1ea81c9f64..30a12b9298 100755 --- a/test/files/run/weakconform.scala +++ b/test/files/run/weakconform.scala @@ -1,4 +1,4 @@ -object Test extends Application { +object Test extends App { val x: Float = 10/3 assert(x == 3.0) } -- cgit v1.2.3