diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-05-13 12:08:27 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-05-13 12:08:27 +0200 |
commit | 73a93505c432b410ae39fb3c4d6168b2e49832ce (patch) | |
tree | 53d45141a7b93682bea6430b0fb6ab28c3c3fad3 | |
parent | 89bacb9c25a58454ff1878e67f7ea07ffc8c269f (diff) | |
download | dotty-73a93505c432b410ae39fb3c4d6168b2e49832ce.tar.gz dotty-73a93505c432b410ae39fb3c4d6168b2e49832ce.tar.bz2 dotty-73a93505c432b410ae39fb3c4d6168b2e49832ce.zip |
Running rewrite tool on run tests.
731 files changed, 2131 insertions, 1786 deletions
diff --git a/tests/pending/run/Course-2002-03.scala b/tests/pending/run/Course-2002-03.scala index c3b357e61..44cc75aaa 100644 --- a/tests/pending/run/Course-2002-03.scala +++ b/tests/pending/run/Course-2002-03.scala @@ -272,7 +272,7 @@ object M8 { new NonEmpty(f(elem), lset, rset) } - def foreach(f: Int => Unit) { + def foreach(f: Int => Unit): Unit = { left.foreach(f); f(elem); right.foreach(f); @@ -374,7 +374,7 @@ object M9 { //############################################################################ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { M0; M1; M2; diff --git a/tests/pending/run/Course-2002-05.scala b/tests/pending/run/Course-2002-05.scala index 80317bc75..c1e6b07c0 100644 --- a/tests/pending/run/Course-2002-05.scala +++ b/tests/pending/run/Course-2002-05.scala @@ -144,7 +144,7 @@ object M3 { placeQueens(n) } - def test { + def test: Unit = { Console.println("queens(1) = " + queens(1)); Console.println("queens(2) = " + queens(2)); Console.println("queens(3) = " + queens(3)); @@ -189,7 +189,7 @@ object M4 { placeQueens(n); } - def test { + def test: Unit = { Console.println("queens(1) = " + queens(1)); Console.println("queens(2) = " + queens(2)); Console.println("queens(3) = " + queens(3)); @@ -201,7 +201,7 @@ object M4 { //############################################################################ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { M0.test; M1.test; M2.test; diff --git a/tests/pending/run/Course-2002-07.scala b/tests/pending/run/Course-2002-07.scala index 2d9457653..b26eda1e0 100644 --- a/tests/pending/run/Course-2002-07.scala +++ b/tests/pending/run/Course-2002-07.scala @@ -666,7 +666,7 @@ object MB { Console.println("f0(x) = " + f0); Console.println; - def check(n: String, f: Expr, x: Int, e: Int) { + def check(n: String, f: Expr, x: Int, e: Int): Unit = { val a: Int = f.evaluate(List(("x",x))); val s: String = if (a == e) "ok" else "KO(" + e + ")"; Console.println(n + "(" + x + ") = " + a + " " + s); @@ -702,7 +702,7 @@ object MB { //############################################################################ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { M0.test; M1.test; M2.test; diff --git a/tests/pending/run/Course-2002-09.scala b/tests/pending/run/Course-2002-09.scala index 704f2ec0a..588703ddc 100644 --- a/tests/pending/run/Course-2002-09.scala +++ b/tests/pending/run/Course-2002-09.scala @@ -64,7 +64,7 @@ class Eq(a: Quantity, b: Quantity) extends Constraint { case (Some(x), _ ) => b.setValue(x, this); case (_ , Some(y)) => a.setValue(y, this); } - def dropValue { + def dropValue: Unit = { a.forgetValue(this); b.forgetValue(this); } a connect this; @@ -81,7 +81,7 @@ class Constant(q: Quantity, v: Double) extends Constraint { class Probe(name: String, q: Quantity) extends Constraint { def newValue: Unit = printProbe(q.getValue); def dropValue: Unit = printProbe(None); - private def printProbe(v: Option[Double]) { + private def printProbe(v: Option[Double]): Unit = { val vstr = v match { case Some(x) => x.toString() case None => "?" @@ -320,7 +320,7 @@ object M3 { //############################################################################ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { M0.test; M1.test; M2.test; diff --git a/tests/pending/run/Meter.scala b/tests/pending/run/Meter.scala index a10ad31b4..9315be062 100644 --- a/tests/pending/run/Meter.scala +++ b/tests/pending/run/Meter.scala @@ -21,7 +21,7 @@ package a { def apply(x: Double): Meter = new Meter(x) - implicit val boxings = new BoxingConversions[Meter, Double] { + implicit val boxings: a.BoxingConversions[a.Meter,Double] = new BoxingConversions[Meter, Double] { def box(x: Double) = new Meter(x) def unbox(m: Meter) = m.underlying } @@ -33,7 +33,7 @@ package a { override def toString = unbox.toString+"ft" } object Foot { - implicit val boxings = new BoxingConversions[Foot, Double] { + implicit val boxings: a.BoxingConversions[a.Foot,Double] = new BoxingConversions[Foot, Double] { def box(x: Double) = new Foot(x) def unbox(m: Foot) = m.unbox } @@ -80,7 +80,7 @@ object Test extends App { { println("testing native arrays") val arr = Array(x, y + x) println(arr.deep) - def foo[T <: Printable](x: Array[T]) { + def foo[T <: Printable](x: Array[T]): Unit = { for (i <- 0 until x.length) { x(i).print; println(" "+x(i)) } } val m = arr(0) diff --git a/tests/pending/run/MeterCaseClass.scala b/tests/pending/run/MeterCaseClass.scala index 39d95c2af..9b32fc24e 100644 --- a/tests/pending/run/MeterCaseClass.scala +++ b/tests/pending/run/MeterCaseClass.scala @@ -18,7 +18,7 @@ package a { private[a] trait MeterArg - implicit val boxings = new BoxingConversions[Meter, Double] { + implicit val boxings: a.BoxingConversions[a.Meter,Double] = new BoxingConversions[Meter, Double] { def box(x: Double) = new Meter(x) def unbox(m: Meter) = m.underlying } @@ -30,7 +30,7 @@ package a { override def toString = unbox.toString+"ft" } object Foot { - implicit val boxings = new BoxingConversions[Foot, Double] { + implicit val boxings: a.BoxingConversions[a.Foot,Double] = new BoxingConversions[Foot, Double] { def box(x: Double) = new Foot(x) def unbox(m: Foot) = m.unbox } @@ -77,7 +77,7 @@ object Test extends App { { println("testing native arrays") val arr = Array(x, y + x) println(arr.deep) - def foo[T <: Printable](x: Array[T]) { + def foo[T <: Printable](x: Array[T]): Unit = { for (i <- 0 until x.length) { x(i).print; println(" "+x(i)) } } val m = arr(0) diff --git a/tests/pending/run/MutableListTest.scala b/tests/pending/run/MutableListTest.scala index 322a368b1..8efb8281d 100644 --- a/tests/pending/run/MutableListTest.scala +++ b/tests/pending/run/MutableListTest.scala @@ -6,7 +6,7 @@ import scala.collection.mutable.MutableList class ExtList[T] extends MutableList[T] { - def printState { + def printState: Unit = { println("Length: " + len) println("Last elem: " + last0.elem) println("First elem: " + first0.elem) @@ -18,7 +18,7 @@ class ExtList[T] extends MutableList[T] { object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { testEmpty testAddElement testAddFewElements @@ -26,13 +26,13 @@ object Test { testTraversables } - def testEmpty { + def testEmpty: Unit = { val mlist = new MutableList[Int] assert(mlist.isEmpty) assert(mlist.get(0) == None) } - def testAddElement { + def testAddElement: Unit = { val mlist = new MutableList[Int] mlist += 17 assert(mlist.nonEmpty) @@ -50,7 +50,7 @@ object Test { assert(mlist.tail.length == 0) } - def testAddFewElements { + def testAddFewElements: Unit = { val mlist = new MutableList[Int] for (i <- 0 until 2) mlist += i // mlist.printState @@ -62,7 +62,7 @@ object Test { assert(mlist.tail.tail.isEmpty) } - def testAddMoreElements { + def testAddMoreElements: Unit = { val mlist = new MutableList[Int] for (i <- 0 until 10) mlist += i * i assert(mlist.nonEmpty) @@ -93,7 +93,7 @@ object Test { assert(mlist.last == 9999) } - def testTraversables { + def testTraversables: Unit = { val mlist = new MutableList[Int] for (i <- 0 until 10) mlist += i * i var lst = mlist.drop(5) diff --git a/tests/pending/run/QueueTest.scala b/tests/pending/run/QueueTest.scala index 859ce2071..8c35e39cb 100644 --- a/tests/pending/run/QueueTest.scala +++ b/tests/pending/run/QueueTest.scala @@ -6,7 +6,7 @@ import scala.collection.mutable.Queue class ExtQueue[T] extends Queue[T] { - def printState { + def printState: Unit = { println("-------------------") println("Length: " + len) println("First: " + first0) @@ -17,7 +17,7 @@ class ExtQueue[T] extends Queue[T] { object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { testEmpty testEnqueue testTwoEnqueues @@ -25,7 +25,7 @@ object Test { testMoreEnqueues } - def testEmpty { + def testEmpty: Unit = { val queue = new Queue[Int] assert(queue.isEmpty) @@ -42,7 +42,7 @@ object Test { assert(queue.dequeueAll(_ > 500).isEmpty) } - def testEnqueue { + def testEnqueue: Unit = { val queue = new Queue[Int] queue.enqueue(10) @@ -79,7 +79,7 @@ object Test { assert(queue.isEmpty && queue.length == 0) } - def testTwoEnqueues { + def testTwoEnqueues: Unit = { val queue = new ExtQueue[Int] queue.enqueue(30) queue.enqueue(40) @@ -98,7 +98,7 @@ object Test { assert(queue.isEmpty) } - def testFewEnqueues { + def testFewEnqueues: Unit = { val queue = new ExtQueue[Int] queue.enqueue(10) queue.enqueue(20) @@ -167,7 +167,7 @@ object Test { assert(queue.front == 80) } - def testMoreEnqueues { + def testMoreEnqueues: Unit = { val queue = new ExtQueue[Int] for (i <- 0 until 10) queue.enqueue(i * 2) diff --git a/tests/pending/run/ReplacementMatching.scala b/tests/pending/run/ReplacementMatching.scala index 05040d98a..370f7dc25 100644 --- a/tests/pending/run/ReplacementMatching.scala +++ b/tests/pending/run/ReplacementMatching.scala @@ -8,12 +8,12 @@ import util.matching._ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { replacementMatching groupsMatching } - def replacementMatching { + def replacementMatching: Unit = { val regex = """\$\{(.+?)\}""".r val replaced = regex.replaceAllIn("Replacing: ${main}. And another method: ${foo}.", (m: util.matching.Regex.Match) => { @@ -30,7 +30,7 @@ object Test { assert(replaced3 == "Replacing: main. And another: ${foo}.") } - def groupsMatching { + def groupsMatching: Unit = { val Date = """(\d+)/(\d+)/(\d+)""".r for (Regex.Groups(a, b, c) <- Date findFirstMatchIn "1/1/2001 marks the start of the millenium. 31/12/2000 doesn't.") { assert(a == "1") diff --git a/tests/pending/run/SymbolsTest.scala b/tests/pending/run/SymbolsTest.scala index d5948ea16..e7a91ead6 100644 --- a/tests/pending/run/SymbolsTest.scala +++ b/tests/pending/run/SymbolsTest.scala @@ -62,7 +62,7 @@ object Test { def aSymbol = 'myFirstSymbol val anotherSymbol = 'mySecondSymbol - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { testLiterals testForLoop testInnerClasses @@ -77,7 +77,7 @@ object Test { testLazyObjects } - def testLiterals { + def testLiterals: Unit = { val scl = new Slazz assert(scl.s1 == aSymbol) assert(scl.s2 == anotherSymbol) @@ -86,22 +86,22 @@ object Test { assert(scl.s1 == Symbol("myFirstSymbol")) } - def testForLoop { + def testForLoop: Unit = { for (i <- 0 until 100) List("Val" + i) } - def testInnerClasses { + def testInnerClasses: Unit = { val innerPower = new Inner assert(innerPower.simba == 'smba) assert(innerPower.mfs == 'mfsa) } - def testInnerObjects { + def testInnerObjects: Unit = { assert(InnerObject.o1 == 'aaa) assert(InnerObject.o2 == 'ddd) } - def testWithHashMaps { + def testWithHashMaps: Unit = { val map = new collection.mutable.HashMap[Symbol, Symbol] map.put(InnerObject.o1, 'smba) map.put(InnerObject.o2, 'mfsa) @@ -119,7 +119,7 @@ object Test { assert(map('symKey91) == 'symVal91) } - def testLists { + def testLists: Unit = { var lst: List[Symbol] = Nil for (i <- 0 until 100) lst ::= Symbol("lsym" + (99 - i)) assert(lst(0) == 'lsym0) @@ -130,7 +130,7 @@ object Test { assert(lst(90) == 'lsym90) } - def testAnonymous { // TODO complaints classdef can't be found for some reason, runs fine in my case + def testAnonymous: Unit = { // TODO complaints classdef can't be found for some reason, runs fine in my case // val anon = () => { // val simba = 'smba // simba @@ -157,7 +157,7 @@ object Test { // assert(an3() == Symbol("layered" + "")) } - def testNestedObject { + def testNestedObject: Unit = { object nested { def sign = 'sign def insignia = 'insignia @@ -167,7 +167,7 @@ object Test { assert(('insignia).toString == "'insignia") } - def testInheritance { + def testInheritance: Unit = { val base = new Base val sub = new Sub assert(base.basesymbol == 'symbase) @@ -190,7 +190,7 @@ object Test { assert(('symbase).toString == "'symbase") } - def testTraits { + def testTraits: Unit = { val fromTrait = new AnyRef with Signs { def traitsymbol = 'traitSymbol } @@ -240,7 +240,7 @@ object Test { assert(('s8).toString == "'s8") } - def testLazyTraits { + def testLazyTraits: Unit = { val l1 = new AnyRef with Lazy1 val l2 = new AnyRef with Lazy2 val l3 = new AnyRef with Lazy3 @@ -253,7 +253,7 @@ object Test { assert(l3.s3 == 'lazySymbol3) } - def testLazyObjects { + def testLazyObjects: Unit = { assert(SingletonOfLazyness.lazysym == 'lazySymbol) assert(SingletonOfLazyness.another == Symbol("ano" + "ther")) assert((SingletonOfLazyness.lastone).toString == "'lastone") diff --git a/tests/pending/run/UnrolledBuffer.scala b/tests/pending/run/UnrolledBuffer.scala index 62a1f7d08..76201bb7c 100644 --- a/tests/pending/run/UnrolledBuffer.scala +++ b/tests/pending/run/UnrolledBuffer.scala @@ -8,7 +8,7 @@ import collection.mutable.UnrolledBuffer object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val u1 = new UnrolledBuffer[Int] assert(u1.isEmpty) assert(u1.size == 0) @@ -107,7 +107,7 @@ object Test { assertCorrect(u1) } - def assertCorrect(u1: UnrolledBuffer[Int]) { + def assertCorrect(u1: UnrolledBuffer[Int]): Unit = { val sz = u1.size val store = new Array[Int](sz) for (i <- 0 until sz) { diff --git a/tests/pending/run/WeakHashSetTest.scala b/tests/pending/run/WeakHashSetTest.scala index 8072aa9b8..8bcb95091 100644 --- a/tests/pending/run/WeakHashSetTest.scala +++ b/tests/pending/run/WeakHashSetTest.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val test = scala.reflect.internal.util.WeakHashSetTest test.checkEmpty test.checkPlusEquals @@ -30,14 +30,14 @@ package scala.reflect.internal.util { } // basic emptiness check - def checkEmpty { + def checkEmpty: Unit = { val hs = new WeakHashSet[String]() assert(hs.size == 0) hs.diagnostics.fullyValidate } // make sure += works - def checkPlusEquals { + def checkPlusEquals: Unit = { val hs = new WeakHashSet[String]() val elements = List("hello", "goodbye") elements foreach (hs += _) @@ -48,7 +48,7 @@ package scala.reflect.internal.util { } // make sure += works when there are collisions - def checkPlusEqualsCollisions { + def checkPlusEqualsCollisions: Unit = { val hs = new WeakHashSet[Collider]() val elements = List("hello", "goodbye") map Collider elements foreach (hs += _) @@ -59,7 +59,7 @@ package scala.reflect.internal.util { } // add a large number of elements to force rehashing and then validate - def checkRehashing { + def checkRehashing: Unit = { val size = 200 val hs = new WeakHashSet[String]() val elements = (0 until size).toList map ("a" + _) @@ -69,7 +69,7 @@ package scala.reflect.internal.util { } // make sure rehashing works properly when the set is rehashed - def checkRehashCollisions { + def checkRehashCollisions: Unit = { val size = 200 val hs = new WeakHashSet[Collider]() val elements = (0 until size).toList map {x => Collider("a" + x)} @@ -80,7 +80,7 @@ package scala.reflect.internal.util { // test that unreferenced objects are removed // not run in an automated environment because gc behavior can't be relied on - def checkRemoveUnreferencedObjects { + def checkRemoveUnreferencedObjects: Unit = { val size = 200 val hs = new WeakHashSet[Collider]() val elements = (0 until size).toList map {x => Collider("a" + x)} @@ -101,7 +101,7 @@ package scala.reflect.internal.util { } // make sure findOrUpdate returns the originally entered element - def checkFindOrUpdate { + def checkFindOrUpdate: Unit = { val size = 200 val hs = new WeakHashSet[Collider]() val elements = (0 until size).toList map {x => Collider("a" + x)} @@ -115,7 +115,7 @@ package scala.reflect.internal.util { } // check -= functionality - def checkMinusEquals { + def checkMinusEquals: Unit = { val hs = new WeakHashSet[String]() val elements = List("hello", "goodbye") elements foreach (hs += _) @@ -127,7 +127,7 @@ package scala.reflect.internal.util { } // check -= when there are collisions - def checkMinusEqualsCollisions { + def checkMinusEqualsCollisions: Unit = { val hs = new WeakHashSet[Collider] val elements = List(Collider("hello"), Collider("goodbye")) elements foreach (hs += _) @@ -142,7 +142,7 @@ package scala.reflect.internal.util { } // check that the clear method actually cleans everything - def checkClear { + def checkClear: Unit = { val size = 200 val hs = new WeakHashSet[String]() val elements = (0 until size).toList map ("a" + _) @@ -154,7 +154,7 @@ package scala.reflect.internal.util { } // check that the iterator covers all the contents - def checkIterator { + def checkIterator: Unit = { val hs = new WeakHashSet[String]() val elements = (0 until 20).toList map ("a" + _) elements foreach (hs += _) @@ -163,7 +163,7 @@ package scala.reflect.internal.util { } // check that the iterator covers all the contents even when there is a collision - def checkIteratorCollisions { + def checkIteratorCollisions: Unit = { val hs = new WeakHashSet[Collider] val elements = (0 until 20).toList map {x => Collider("a" + x)} elements foreach (hs += _) diff --git a/tests/pending/run/absoverride.scala b/tests/pending/run/absoverride.scala index a3c03df0d..030149893 100644 --- a/tests/pending/run/absoverride.scala +++ b/tests/pending/run/absoverride.scala @@ -5,7 +5,7 @@ abstract class AbsIterator { } trait RichIterator extends AbsIterator { - def foreach(f: T => Unit) { + def foreach(f: T => Unit): Unit = { while (hasNext) f(next) } } @@ -33,7 +33,7 @@ trait LoggedIterator extends AbsIterator { class Iter2(s: String) extends StringIterator(s) with SyncIterator with LoggedIterator; object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { class Iter extends StringIterator(args(0)) with RichIterator with SyncIterator with LoggedIterator val iter = new Iter iter foreach Console.println diff --git a/tests/pending/run/abstypetags_core.scala b/tests/pending/run/abstypetags_core.scala index 2692fec03..4c98a65c0 100644 --- a/tests/pending/run/abstypetags_core.scala +++ b/tests/pending/run/abstypetags_core.scala @@ -31,4 +31,4 @@ object Test extends App { println(implicitly[WeakTypeTag[Null]]) println(implicitly[WeakTypeTag[Nothing]] eq WeakTypeTag.Nothing) println(implicitly[WeakTypeTag[Nothing]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/array-charSeq.scala b/tests/pending/run/array-charSeq.scala index 53796bb9d..64055c640 100644 --- a/tests/pending/run/array-charSeq.scala +++ b/tests/pending/run/array-charSeq.scala @@ -3,7 +3,7 @@ object Test { var xs: CharSequence = arr val hash = xs.hashCode - def check(chars: CharSequence) { + def check(chars: CharSequence): Unit = { println("\n[check '" + chars + "'] len = " + chars.length) chars match { case x: Predef.ArrayCharSequence => assert(x.__arrayOfChars eq arr, ((x.__arrayOfChars, arr))) diff --git a/tests/pending/run/arrayclone-new.scala b/tests/pending/run/arrayclone-new.scala index 506e4f527..e9356de85 100644 --- a/tests/pending/run/arrayclone-new.scala +++ b/tests/pending/run/arrayclone-new.scala @@ -105,4 +105,4 @@ object PolymorphicArrayClone{ val y : Array[Int] = mangled.it; // make sure it's unboxed testIt(mangled.it, 0, 1); -}
\ No newline at end of file +} diff --git a/tests/pending/run/arraycopy.scala b/tests/pending/run/arraycopy.scala index bb06200dc..77a8809a1 100644 --- a/tests/pending/run/arraycopy.scala +++ b/tests/pending/run/arraycopy.scala @@ -1,7 +1,7 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val a = new Array[Int](10) val b = new Array[Any](10) for (i <- 0 until 10) b(i) = i diff --git a/tests/pending/run/arrays.scala b/tests/pending/run/arrays.scala index c8bf80ea6..1a77a191c 100644 --- a/tests/pending/run/arrays.scala +++ b/tests/pending/run/arrays.scala @@ -100,7 +100,7 @@ object Test { var checks: Int = 0; - def check(test0: Boolean, actual: Any, expected: Any) { + def check(test0: Boolean, actual: Any, expected: Any): Unit = { val test1: Boolean = actual == expected; if (!test0 || !test1) { val s0 = if (test0) "ok" else "KO"; @@ -112,27 +112,27 @@ object Test { checks += 1 } - def check_Ta[T <: Any ](xs: Array[T], l: Int, x0: T, c: Check[T]) { + def check_Ta[T <: Any ](xs: Array[T], l: Int, x0: T, c: Check[T]): Unit = { check(xs.length == l, xs.length, l); check(xs(0) == x0, xs(0), x0); c(xs); } - def check_Tv[T <: AnyVal ](xs: Array[T], l: Int, x0: T, c: Check[T]) { + def check_Tv[T <: AnyVal ](xs: Array[T], l: Int, x0: T, c: Check[T]): Unit = { check(xs.length == l, xs.length, l); check(xs(0) == x0, xs(0), x0); check_Ta(xs, l, x0, c); c(xs); } - def check_Tr[T <: AnyRef ](xs: Array[T], l: Int, x0: T, c: Check[T]) { + def check_Tr[T <: AnyRef ](xs: Array[T], l: Int, x0: T, c: Check[T]): Unit = { check(xs.length == l, xs.length, l); check(xs(0) == x0, xs(0), x0); check_Ta(xs, l, x0, c); c(xs); } - def check_To[T <: Object ](xs: Array[T], l: Int, x0: T, c: Check[T]) { + def check_To[T <: Object ](xs: Array[T], l: Int, x0: T, c: Check[T]): Unit = { check(xs.length == l, xs.length, l); check(xs(0) == x0, xs(0), x0); check_Ta(xs, l, x0, c); @@ -140,7 +140,7 @@ object Test { c(xs); } - def check_Tm[T <: Map ](xs: Array[T], l: Int, x0: T, c: Check[T]) { + def check_Tm[T <: Map ](xs: Array[T], l: Int, x0: T, c: Check[T]): Unit = { check(xs.length == l, xs.length, l) check(xs(0) == x0, xs(0), x0) check_Ta(xs, l, x0, c) @@ -149,7 +149,7 @@ object Test { c(xs) } - def check_Tn[T <: Strings](xs: Array[T], l: Int, x0: T, c: Check[T]) { + def check_Tn[T <: Strings](xs: Array[T], l: Int, x0: T, c: Check[T]): Unit = { check(xs.length == l, xs.length, l) check(xs(0) == x0, xs(0), x0) check_Ta(xs, l, x0, c) @@ -158,7 +158,7 @@ object Test { c(xs) } - def checkT2368() { + def checkT2368(): Unit = { val arr = Array(1, 2, 3) arr(0) += 1 assert(arr(0) == 2) @@ -331,7 +331,7 @@ object Test { check(xs(2) == m2, xs(2), m2); } - def ncheck(xs: Array[Strings]) { + def ncheck(xs: Array[Strings]): Unit = { check(xs.length == 3, xs.length, 3) check(xs(0) == n0, xs(0), n0) check(xs(1) == n1, xs(1), n1) @@ -341,13 +341,13 @@ object Test { //########################################################################## // Miscellaneous checks - def checkZip { + def checkZip: Unit = { val zipped = Array("a", "b", "c").zip(Array(1, 2)) val expected = Array(("a",1), ("b",2)) check(zipped sameElements expected, zipped.toList, expected.toList) } - def checkConcat { // ticket #713 + def checkConcat: Unit = { // ticket #713 val x1 = Array.concat(Array(1, 2), Array(3, 4)) val y1 = Array(1, 2, 3, 4) check(x1 sameElements y1, x1.toList, y1.toList) diff --git a/tests/pending/run/boolexprs.scala b/tests/pending/run/boolexprs.scala index b9b4faea9..94313d9c8 100644 --- a/tests/pending/run/boolexprs.scala +++ b/tests/pending/run/boolexprs.scala @@ -33,7 +33,7 @@ object Test2 { // Test code object Test { - def check_success(name: String, closure: => Int, expected: Int) { + def check_success(name: String, closure: => Int, expected: Int): Unit = { Console.print("test " + name); try { val actual: Int = closure; @@ -49,7 +49,7 @@ object Test { Console.println; } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { check_success("Test1", Test1.run, 1); check_success("Test2", Test2.run, 0); Console.println; diff --git a/tests/pending/run/boolord.scala b/tests/pending/run/boolord.scala index 05d06ffea..7a827ffc3 100644 --- a/tests/pending/run/boolord.scala +++ b/tests/pending/run/boolord.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { Console.println("false < false = " + (false < false)) Console.println("false < true = " + (false < true)) Console.println("true < false = " + (true < false)) diff --git a/tests/pending/run/bugs.scala b/tests/pending/run/bugs.scala index 02849b581..381cf807b 100644 --- a/tests/pending/run/bugs.scala +++ b/tests/pending/run/bugs.scala @@ -7,7 +7,7 @@ object Bug98Test { object MyCase { def name = "mycase" } - def test(args: Array[String]) { + def test(args: Array[String]): Unit = { println(MyCase.name) } } @@ -31,7 +31,7 @@ object Bug120Test { def print[A](str: String, res: A): A = { println(str); res } - def test(args: Array[String]) { + def test(args: Array[String]): Unit = { val c = new Bug120C(1) () } @@ -44,7 +44,7 @@ object Bug135Test { import scala.collection.immutable.TreeMap - def test(args: Array[String]) { + def test(args: Array[String]): Unit = { val myMap:TreeMap[Int, String] = new TreeMap val map1 = myMap + ((42, "The answer")) println(map1.get(42)) @@ -65,17 +65,17 @@ trait Bug142Bar2 { type Inner; def foo: Inner; foo; } trait Bug142Bar3 { class Inner; def foo: Inner = {Console.println("ok"); null}; } trait Bug142Bar4 { class Inner; def foo: Inner; foo; } -object Bug142Test1 extends Bug142Foo1 with Bug142Bar1 { def test(args: Array[String]) {} } -object Bug142Test2 extends Bug142Foo2 with Bug142Bar2 { def test(args: Array[String]) {} } -object Bug142Test3 extends Bug142Foo3 with Bug142Bar3 { def test(args: Array[String]) {} } -object Bug142Test4 extends Bug142Foo4 with Bug142Bar4 { def test(args: Array[String]) {} } -object Bug142Test5 extends Bug142Foo1 with Bug142Bar1 { def test(args: Array[String]) {} } -object Bug142Test6 extends Bug142Foo2 with Bug142Bar2 { def test(args: Array[String]) {} } -object Bug142Test7 extends Bug142Foo3 with Bug142Bar3 { def test(args: Array[String]) {} } -object Bug142Test8 extends Bug142Foo4 with Bug142Bar4 { def test(args: Array[String]) {} } +object Bug142Test1 extends Bug142Foo1 with Bug142Bar1 { def test(args: Array[String]): Unit = {} } +object Bug142Test2 extends Bug142Foo2 with Bug142Bar2 { def test(args: Array[String]): Unit = {} } +object Bug142Test3 extends Bug142Foo3 with Bug142Bar3 { def test(args: Array[String]): Unit = {} } +object Bug142Test4 extends Bug142Foo4 with Bug142Bar4 { def test(args: Array[String]): Unit = {} } +object Bug142Test5 extends Bug142Foo1 with Bug142Bar1 { def test(args: Array[String]): Unit = {} } +object Bug142Test6 extends Bug142Foo2 with Bug142Bar2 { def test(args: Array[String]): Unit = {} } +object Bug142Test7 extends Bug142Foo3 with Bug142Bar3 { def test(args: Array[String]): Unit = {} } +object Bug142Test8 extends Bug142Foo4 with Bug142Bar4 { def test(args: Array[String]): Unit = {} } object Bug142Test { - def test(args:Array[String]) { + def test(args:Array[String]): Unit = { Bug142Test1; Bug142Test2; Bug142Test3; @@ -93,7 +93,7 @@ object Bug142Test { object Bug166Test { import scala.collection.mutable.HashMap - def test(args: Array[String]) { + def test(args: Array[String]): Unit = { val m: HashMap[String,String] = new HashMap[String, String] m.update("foo","bar") } @@ -110,7 +110,7 @@ class Bug167Node(bar:Int) { } object Bug167Test { - def test(args: Array[String]) { + def test(args: Array[String]): Unit = { if (new Bug167Node(0).foo != 1) println("bug 167"); } } @@ -124,7 +124,7 @@ class Bug168Foo { } object Bug168Test { - def test(args: Array[String]) { + def test(args: Array[String]): Unit = { (new Bug168Foo).foo () } @@ -152,7 +152,7 @@ class Bug174Foo[X] { } object Bug174Test { - def test(args: Array[String]) { + def test(args: Array[String]): Unit = { (new Bug174Foo[Int]).inner.test () } @@ -271,7 +271,7 @@ object Bug226Test { def id[a](xs: Array[a]): Array[a] = xs; - def test(args: Array[String]) { + def test(args: Array[String]): Unit = { var xs = new Array[Int](1); class X { xs }; xs = id(xs); @@ -294,7 +294,7 @@ object Bug233Test { // Bug 250 object Bug250Test { - def test(args: Array[String]) { + def test(args: Array[String]): Unit = { if (true) null; () } @@ -315,7 +315,7 @@ object Bug257Test { f2(x); } - def test(args: Array[String]) { + def test(args: Array[String]): Unit = { f(sayhello())(sayhi()) } } @@ -332,7 +332,7 @@ abstract class Bug266AFoo { object Bug266ATest extends Bug266AFoo { type T = String; - class I1 extends I0 { def f(x: String) { Console.println("hello") } } + class I1 extends I0 { def f(x: String): Unit = { Console.println("hello") } } def test(args: Array[String]): Unit = { new I1; () } } @@ -353,7 +353,7 @@ abstract class Bug266BA1 extends Bug266BA { trait Bug266BB extends Bug266BA { type t = Int; class P1 extends Bug266BB.this.P { - def f(x: Int) { Console.println(x + 1) } + def f(x: Int): Unit = { Console.println(x + 1) } } def mkP = new P1; val in = 3; @@ -367,7 +367,7 @@ object Bug266BTest { // main object Bug266Test { - def test(args: Array[String]) { + def test(args: Array[String]): Unit = { Bug266ATest.test(args); Bug266BTest.test(args); } @@ -390,7 +390,7 @@ object Bug316Test { // Bug 328 object Bug328Test { - def test0(f: Function1[Int,String]) {} + def test0(f: Function1[Int,String]): Unit = {} def test(args: Array[String]): Unit = test0(args); } @@ -429,7 +429,7 @@ object Bug399Test { (new G).f } - def test(args: Array[String]) { + def test(args: Array[String]): Unit = { Console.println(f("a")); } } @@ -439,7 +439,7 @@ object Bug399Test { object Test { var errors: Int = 0 - def test(bug: Int, test: => Unit) { + def test(bug: Int, test: => Unit): Unit = { Console.println("<<< bug " + bug) try { test; @@ -453,7 +453,7 @@ object Test { Console.println } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { test( 98, Bug98Test.test(args)); test(120, Bug120Test.test(args)); diff --git a/tests/pending/run/byname.scala b/tests/pending/run/byname.scala index 132555234..f776fc7a5 100644 --- a/tests/pending/run/byname.scala +++ b/tests/pending/run/byname.scala @@ -1,6 +1,6 @@ object Test extends App { -def test[A](name: String, expect: A, actual: => A) { +def test[A](name: String, expect: A, actual: => A): Unit = { if (expect != actual) throw new AssertionError("test " + name + " failed") else println("test " + name + " completed properly") } diff --git a/tests/pending/run/bytecodecs.scala b/tests/pending/run/bytecodecs.scala index 837be0edd..454958dfa 100644 --- a/tests/pending/run/bytecodecs.scala +++ b/tests/pending/run/bytecodecs.scala @@ -2,28 +2,28 @@ import scala.reflect.internal.pickling.ByteCodecs._ object Test { - def test8to7(xs: Array[Byte]) { + def test8to7(xs: Array[Byte]): Unit = { val ys = encode8to7(xs) decode7to8(ys, ys.length) assert(ys.take(xs.length).deep == xs.deep, "test8to7("+xs.deep+") failed, result = "+ys.take(xs.length).deep) } - def testAll(xs: Array[Byte]) { + def testAll(xs: Array[Byte]): Unit = { val ys = encode(xs) decode(ys) assert(ys.take(xs.length).deep == xs.deep, "testAll("+xs.deep+") failed, result = "+ys.take(xs.length).deep) } - def test(inputs: Array[Byte]*) { + def test(inputs: Array[Byte]*): Unit = { for (input <- inputs) { test8to7(input) testAll(input) } } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { test( Array(1, 2, 3), Array(1, 2, 3, 4, 5, 6, 7), diff --git a/tests/pending/run/checked.scala b/tests/pending/run/checked.scala index e4db9c091..711181e5f 100644 --- a/tests/pending/run/checked.scala +++ b/tests/pending/run/checked.scala @@ -34,7 +34,12 @@ abstract class NeedsXEarly { } // should pass -class GoodX extends { val x = 1 } with NeedsXEarly { +class GoodX extends NeedsXEarly { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val x = 1 +// END copied early initializers + } // should throw @@ -75,17 +80,23 @@ class BadMixin extends LazyFields with XY { } // should print 24 -class GoodMixin extends { - override val x = 10 +class GoodMixin extends LazyFields with XY { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +override val x = 10 override val y = 11 - } with LazyFields with XY { +// END copied early initializers + println("[OK]: " + needsSomeEarly) } -class TestInterference extends { - override val x = 10 +class TestInterference extends A with T with LazyFields { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +override val x = 10 override val y = 11 -} with A with T with LazyFields { +// END copied early initializers + println("[OK]: " + needsSomeEarly) } diff --git a/tests/pending/run/classtags_contextbound.scala b/tests/pending/run/classtags_contextbound.scala index 2f1279215..a3cfb2b9e 100644 --- a/tests/pending/run/classtags_contextbound.scala +++ b/tests/pending/run/classtags_contextbound.scala @@ -4,4 +4,4 @@ object Test extends App { def mkArray[T: ClassTag] = Array[T]() def foo[T: ClassTag] = mkArray[T] println(foo[Int].getClass) -}
\ No newline at end of file +} diff --git a/tests/pending/run/classtags_core.scala b/tests/pending/run/classtags_core.scala index 0e174d824..0a9fc4a31 100644 --- a/tests/pending/run/classtags_core.scala +++ b/tests/pending/run/classtags_core.scala @@ -31,4 +31,4 @@ object Test extends App { println(implicitly[ClassTag[Null]]) println(implicitly[ClassTag[Nothing]] eq ClassTag.Nothing) println(implicitly[ClassTag[Nothing]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/classtags_multi.scala b/tests/pending/run/classtags_multi.scala index b4b47bcf0..ee9481be3 100644 --- a/tests/pending/run/classtags_multi.scala +++ b/tests/pending/run/classtags_multi.scala @@ -6,4 +6,4 @@ object Test extends App { println(classTag[Array[Array[Int]]]) println(classTag[Array[Array[Array[Int]]]]) println(classTag[Array[Array[Array[Array[Int]]]]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/collection-stacks.scala b/tests/pending/run/collection-stacks.scala index be9fbbf1a..ed627640d 100644 --- a/tests/pending/run/collection-stacks.scala +++ b/tests/pending/run/collection-stacks.scala @@ -11,7 +11,7 @@ object Test extends App { immutable.Stack.empty[T] pushAll xs } - def check[T](expected: T, got: T) { + def check[T](expected: T, got: T): Unit = { println(got + ": " + (expected == got)) } diff --git a/tests/pending/run/collections.scala b/tests/pending/run/collections.scala index 2b19ff4e7..206a2b96b 100644 --- a/tests/pending/run/collections.scala +++ b/tests/pending/run/collections.scala @@ -8,7 +8,7 @@ object Test extends App { def sum[A](xs: Iterable[Int]) = (0 /: xs)((x, y) => x + y) - def time(op: => Unit) { + def time(op: => Unit): Unit = { val start = currentTime op if (printTime) println(" time = "+(currentTime - start)+"ms") diff --git a/tests/pending/run/colltest.scala b/tests/pending/run/colltest.scala index 703e94a3c..46e0c8478 100644 --- a/tests/pending/run/colltest.scala +++ b/tests/pending/run/colltest.scala @@ -24,7 +24,7 @@ class TestSet(s0: Set[Int], s1: Set[Int]) { case 6 => "add" case 7 => "size" } - def checkSubSet(pre: String, s0: Set[Int], s1: Set[Int]) { + def checkSubSet(pre: String, s0: Set[Int], s1: Set[Int]): Unit = { for (e <- s0.iterator) if (!(s1 contains e)) { assert(false, pre+" element: "+e+"\n S0 = "+s0+"\n S1 = "+s1) @@ -46,7 +46,7 @@ class TestSet(s0: Set[Int], s1: Set[Int]) { Console.println("succeeded for "+Iterations+" iterations.") } object Test extends App { - def t3954 { + def t3954: Unit = { import scala.collection.mutable import scala.collection.immutable val result = new mutable.ImmutableSetAdaptor(immutable.ListSet.empty[Int]) diff --git a/tests/pending/run/colltest1.scala b/tests/pending/run/colltest1.scala index e0ec37858..188909fb8 100644 --- a/tests/pending/run/colltest1.scala +++ b/tests/pending/run/colltest1.scala @@ -6,7 +6,7 @@ import scala.language.postfixOps object Test extends App { - def orderedTraversableTest(empty: Traversable[Int]) { + def orderedTraversableTest(empty: Traversable[Int]): Unit = { println("new test starting with "+empty) assert(empty.isEmpty) val ten = empty ++ List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) @@ -67,7 +67,7 @@ object Test extends App { assert(ten.mkString("[", "; ", "]") endsWith "[1; 2; 3; 4; 5; 6; 7; 8; 9; 10]") } - def orderedIterableTest(empty: Iterable[Int]) { + def orderedIterableTest(empty: Iterable[Int]): Unit = { orderedTraversableTest(empty) val six = empty ++ List(1, 2, 3, 4, 5, 6) assert(six.iterator.toStream == six) @@ -76,7 +76,7 @@ object Test extends App { assert(six sameElements (1 to 6)) } - def sequenceTest(empty: Seq[Int]) { + def sequenceTest(empty: Seq[Int]): Unit = { orderedIterableTest(empty) val ten = empty ++ (1 to 10) println(ten) @@ -137,7 +137,7 @@ object Test extends App { assert(ten.sortWith(_ > _) == ten.reverse) } - def setTest(empty: => Set[String]) { + def setTest(empty: => Set[String]): Unit = { var s = empty + "A" + "B" + "C" s += ("D", "E", "F") s ++= List("G", "H", "I") @@ -161,7 +161,7 @@ object Test extends App { assert(bc subsetOf abc) } - def rangeTest(r: Range) { + def rangeTest(r: Range): Unit = { val ten = List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) assert(r == ten) assert(r.toList == ten) diff --git a/tests/pending/run/concurrent-map-conversions.scala b/tests/pending/run/concurrent-map-conversions.scala index d23d5bbbe..225efe1da 100644 --- a/tests/pending/run/concurrent-map-conversions.scala +++ b/tests/pending/run/concurrent-map-conversions.scala @@ -5,17 +5,17 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { testConversions() testConverters() } - def needPackageConcurrentMap(map: collection.concurrent.Map[Int, Int]) { + def needPackageConcurrentMap(map: collection.concurrent.Map[Int, Int]): Unit = { } - def needJavaConcurrent(map: java.util.concurrent.ConcurrentMap[Int, Int]) { + def needJavaConcurrent(map: java.util.concurrent.ConcurrentMap[Int, Int]): Unit = { } - def testConversions() { + def testConversions(): Unit = { import collection.JavaConversions._ val skiplist = new java.util.concurrent.ConcurrentSkipListMap[Int, Int] val ctrie = new collection.concurrent.TrieMap[Int, Int] @@ -24,7 +24,7 @@ object Test { needJavaConcurrent(ctrie) } - def testConverters() { + def testConverters(): Unit = { import collection.JavaConverters._ val skiplist = new java.util.concurrent.ConcurrentSkipListMap[Int, Int] val ctrie = new collection.concurrent.TrieMap[Int, Int] diff --git a/tests/pending/run/concurrent-stream.scala b/tests/pending/run/concurrent-stream.scala index 9d5ba0428..8946a85fd 100644 --- a/tests/pending/run/concurrent-stream.scala +++ b/tests/pending/run/concurrent-stream.scala @@ -29,7 +29,7 @@ object Test { println("Evaluation 1: " + eval1) } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println("Testing standard cons.") testCons(Stream.cons.apply(_, _)) } diff --git a/tests/pending/run/constant-optimization.scala b/tests/pending/run/constant-optimization.scala index 5d13272f3..d7d59f802 100644 --- a/tests/pending/run/constant-optimization.scala +++ b/tests/pending/run/constant-optimization.scala @@ -1,19 +1,19 @@ object Test extends App { - def testBothReachable() { + def testBothReachable(): Unit = { val i = util.Random.nextInt val x = if (i % 2 == 0) null else "good" val y = if (x == null) "good" else x + "" println(s"testBothReachable: $y") } - def testOneReachable() { + def testOneReachable(): Unit = { val i = 1 val x = if (i != 1) null else "good" val y = if (x == null) "good" else x + "" println(s"testOneReachable: $y") } - def testAllReachable() { + def testAllReachable(): Unit = { val i = util.Random.nextInt val y = (i % 2) match { case 0 => "good" @@ -23,7 +23,7 @@ object Test extends App { println(s"testAllReachable: $y") } - def testOneUnreachable() { + def testOneUnreachable(): Unit = { val i = util.Random.nextInt val x = if (i % 2 == 0) { 1 @@ -38,7 +38,7 @@ object Test extends App { println(s"testOneUnreachable: $y") } - def testDefaultUnreachable() { + def testDefaultUnreachable(): Unit = { val i = util.Random.nextInt val x = if (i % 2 == 0) { 1 diff --git a/tests/pending/run/contrib674.scala b/tests/pending/run/contrib674.scala index 45c9871fc..bb9dad368 100644 --- a/tests/pending/run/contrib674.scala +++ b/tests/pending/run/contrib674.scala @@ -1,7 +1,7 @@ // causes VerifyError with scala-2.5.1 object Test extends App { - def bad() { + def bad(): Unit = { try { 1 } catch { diff --git a/tests/pending/run/ctor-order.scala b/tests/pending/run/ctor-order.scala index 5f5871691..2456925e6 100644 --- a/tests/pending/run/ctor-order.scala +++ b/tests/pending/run/ctor-order.scala @@ -6,13 +6,12 @@ class Outer { val x = 10; } - class X extends { - /* The constructor of X should set this.$outer to the outer instance - * *before* calling the super constructors. This is tested by - * mixin M1, which tries to access global from the enclosing class. - */ - val outer = Outer.this - } with AnyRef with M1 + class X extends AnyRef with M1 { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val outer = Outer.this +// END copied early initializers +} trait M1 { self: X => Console.println(global.x); diff --git a/tests/pending/run/ctries-new/concmap.scala b/tests/pending/run/ctries-new/concmap.scala index 76916564a..cd54f91ae 100644 --- a/tests/pending/run/ctries-new/concmap.scala +++ b/tests/pending/run/ctries-new/concmap.scala @@ -9,7 +9,7 @@ object ConcurrentMapSpec extends Spec { val initsz = 500 val secondsz = 750 - def test() { + def test(): Unit = { "support put" in { val ct = new TrieMap[Wrap, Int] for (i <- 0 until initsz) assert(ct.put(new Wrap(i), i) == None) @@ -61,7 +61,7 @@ object ConcurrentMapSpec extends Spec { for (i <- 0 until sz) ct.update(new Wrap(i), i) class Updater(index: Int, offs: Int) extends Thread { - override def run() { + override def run(): Unit = { var repeats = 0 for (i <- 0 until sz) { val j = (offs + i) % sz @@ -93,7 +93,7 @@ object ConcurrentMapSpec extends Spec { val sz = 110000 class Updater(offs: Int) extends Thread { - override def run() { + override def run(): Unit = { for (i <- 0 until sz) { val j = (offs + i) % sz ct.putIfAbsent(new Wrap(j), j) @@ -115,7 +115,7 @@ object ConcurrentMapSpec extends Spec { for (i <- 0 until sz) ct.update(new Wrap(i), i) class Remover(offs: Int) extends Thread { - override def run() { + override def run(): Unit = { for (i <- 0 until sz) { val j = (offs + i) % sz ct.remove(new Wrap(j), j) @@ -137,7 +137,7 @@ object ConcurrentMapSpec extends Spec { for (i <- 0 until sz) ct(new Wrap(i)) = i class Modifier(index: Int, offs: Int) extends Thread { - override def run() { + override def run(): Unit = { for (j <- 0 until sz) { val i = (offs + j) % sz var success = false diff --git a/tests/pending/run/ctries-new/iterator.scala b/tests/pending/run/ctries-new/iterator.scala index bb1175e61..9bb9390ed 100644 --- a/tests/pending/run/ctries-new/iterator.scala +++ b/tests/pending/run/ctries-new/iterator.scala @@ -3,7 +3,7 @@ import collection.concurrent.TrieMap object IteratorSpec extends Spec { - def test() { + def test(): Unit = { "work for an empty trie" in { val ct = new TrieMap val it = ct.iterator @@ -12,7 +12,7 @@ object IteratorSpec extends Spec { evaluating { it.next() }.shouldProduce [NoSuchElementException] } - def nonEmptyIteratorCheck(sz: Int) { + def nonEmptyIteratorCheck(sz: Int): Unit = { val ct = new TrieMap[Wrap, Int] for (i <- 0 until sz) ct.put(new Wrap(i), i) @@ -77,7 +77,7 @@ object IteratorSpec extends Spec { nonEmptyIteratorCheck(500000) } - def nonEmptyCollideCheck(sz: Int) { + def nonEmptyCollideCheck(sz: Int): Unit = { val ct = new TrieMap[DumbHash, Int] for (i <- 0 until sz) ct.put(new DumbHash(i), i) @@ -122,7 +122,7 @@ object IteratorSpec extends Spec { nonEmptyCollideCheck(5000) } - def assertEqual(a: Map[Wrap, Int], b: Map[Wrap, Int]) { + def assertEqual(a: Map[Wrap, Int], b: Map[Wrap, Int]): Unit = { if (a != b) { println(a.size + " vs " + b.size) } @@ -138,7 +138,7 @@ object IteratorSpec extends Spec { for (i <- 0 until sz) ct.put(new Wrap(i), i) class Modifier extends Thread { - override def run() { + override def run(): Unit = { for (i <- 0 until sz) ct.putIfAbsent(new Wrap(i), i) match { case Some(_) => ct.remove(new Wrap(i)) case None => @@ -146,9 +146,9 @@ object IteratorSpec extends Spec { } } - def consistentIteration(ct: TrieMap[Wrap, Int], checks: Int) { + def consistentIteration(ct: TrieMap[Wrap, Int], checks: Int): Unit = { class Iter extends Thread { - override def run() { + override def run(): Unit = { val snap = ct.readOnlySnapshot() val initial = mutable.Map[Wrap, Int]() for (kv <- snap) initial += kv @@ -179,7 +179,7 @@ object IteratorSpec extends Spec { for (i <- 0 until sz) ct.put(new Wrap(i), i) class Remover extends Thread { - override def run() { + override def run(): Unit = { for (i <- 0 until sz) { assert(ct.remove(new Wrap(i)) == Some(i)) for (i <- 0 until removerslowdown) ct.get(new Wrap(i)) // slow down, mate @@ -189,7 +189,7 @@ object IteratorSpec extends Spec { def consistentIteration(it: Iterator[(Wrap, Int)]) = { class Iter extends Thread { - override def run() { + override def run(): Unit = { val elems = it.toBuffer if (elems.nonEmpty) { val minelem = elems.minBy((x: (Wrap, Int)) => x._1.i)._1.i @@ -218,7 +218,7 @@ object IteratorSpec extends Spec { val ct = new TrieMap[Wrap, Int] class Inserter extends Thread { - override def run() { + override def run(): Unit = { for (i <- 0 until sz) { assert(ct.put(new Wrap(i), i) == None) for (i <- 0 until inserterslowdown) ct.get(new Wrap(i)) // slow down, mate @@ -228,7 +228,7 @@ object IteratorSpec extends Spec { def consistentIteration(it: Iterator[(Wrap, Int)]) = { class Iter extends Thread { - override def run() { + override def run(): Unit = { val elems = it.toSeq if (elems.nonEmpty) { val maxelem = elems.maxBy((x: (Wrap, Int)) => x._1.i)._1.i diff --git a/tests/pending/run/ctries-new/lnode.scala b/tests/pending/run/ctries-new/lnode.scala index 4cc97050e..d4b47c20c 100644 --- a/tests/pending/run/ctries-new/lnode.scala +++ b/tests/pending/run/ctries-new/lnode.scala @@ -9,7 +9,7 @@ object LNodeSpec extends Spec { val initsz = 1500 val secondsz = 1750 - def test() { + def test(): Unit = { "accept elements with the same hash codes" in { val ct = new TrieMap[DumbHash, Int] for (i <- 0 until initsz) ct.update(new DumbHash(i), i) diff --git a/tests/pending/run/ctries-new/main.scala b/tests/pending/run/ctries-new/main.scala index 34f3ec2cc..5c93dd757 100644 --- a/tests/pending/run/ctries-new/main.scala +++ b/tests/pending/run/ctries-new/main.scala @@ -9,7 +9,7 @@ import scala.reflect.{ClassTag, classTag} object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { ConcurrentMapSpec.test() IteratorSpec.test() LNodeSpec.test() @@ -21,17 +21,17 @@ object Test { trait Spec { - implicit def implicitously = scala.language.implicitConversions - implicit def reflectively = scala.language.reflectiveCalls + implicit def implicitously: languageFeature.implicitConversions = scala.language.implicitConversions + implicit def reflectively : languageFeature.reflectiveCalls = scala.language.reflectiveCalls - implicit def str2ops(s: String) = new { - def in[U](body: =>U) { + implicit def str2ops(s: String): AnyRef{def in[U](body: => U): Unit} = new { + def in[U](body: =>U): Unit = { // just execute body body } } - implicit def any2ops(a: Any) = new { + implicit def any2ops(a: Any): AnyRef{def shouldEqual(other: Any): Unit} = new { def shouldEqual(other: Any) = assert(a == other) } diff --git a/tests/pending/run/ctries-new/snapshot.scala b/tests/pending/run/ctries-new/snapshot.scala index 57155d49c..f05fd8e7a 100644 --- a/tests/pending/run/ctries-new/snapshot.scala +++ b/tests/pending/run/ctries-new/snapshot.scala @@ -9,7 +9,7 @@ import collection.concurrent.TrieMap object SnapshotSpec extends Spec { - def test() { + def test(): Unit = { "support snapshots" in { val ctn = new TrieMap ctn.snapshot() @@ -25,7 +25,7 @@ object SnapshotSpec extends Spec { val sz = 4000 class Worker(trie: TrieMap[Wrap, Int]) extends Thread { - override def run() { + override def run(): Unit = { for (i <- 0 until sz) { assert(trie.remove(new Wrap(i)) == Some(i)) for (j <- 0 until sz) @@ -52,7 +52,7 @@ object SnapshotSpec extends Spec { } } - def consistentReadOnly(name: String, readonly: Map[Wrap, Int], sz: Int, N: Int) { + def consistentReadOnly(name: String, readonly: Map[Wrap, Int], sz: Int, N: Int): Unit = { @volatile var e: Exception = null // reads possible entries once and stores them @@ -67,7 +67,7 @@ object SnapshotSpec extends Spec { case ex: Exception => e = ex } - def check() { + def check(): Unit = { val initial = mutable.Map[Wrap, Int]() for (i <- 0 until sz) trie.get(new Wrap(i)) match { case Some(i) => initial.put(new Wrap(i), i) @@ -99,7 +99,7 @@ object SnapshotSpec extends Spec { class Modifier(trie: TrieMap[Wrap, Int], index: Int, rep: Int, sz: Int) extends Thread { setName("Modifier %d".format(index)) - override def run() { + override def run(): Unit = { for (k <- 0 until rep) { for (i <- 0 until sz) trie.putIfAbsent(new Wrap(i), i) match { case Some(_) => trie.remove(new Wrap(i)) @@ -113,7 +113,7 @@ object SnapshotSpec extends Spec { class Remover(trie: TrieMap[Wrap, Int], index: Int, totremovers: Int, sz: Int) extends Thread { setName("Remover %d".format(index)) - override def run() { + override def run(): Unit = { for (i <- 0 until sz) trie.remove(new Wrap((i + sz / totremovers * index) % sz)) } } @@ -165,7 +165,7 @@ object SnapshotSpec extends Spec { threads.foreach(_.join()) } - def consistentNonReadOnly(name: String, trie: TrieMap[Wrap, Int], sz: Int, N: Int) { + def consistentNonReadOnly(name: String, trie: TrieMap[Wrap, Int], sz: Int, N: Int): Unit = { @volatile var e: Exception = null // reads possible entries once and stores them @@ -180,7 +180,7 @@ object SnapshotSpec extends Spec { case ex: Exception => e = ex } - def check() { + def check(): Unit = { val initial = mutable.Map[Wrap, Int]() for (i <- 0 until sz) trie.get(new Wrap(i)) match { case Some(i) => initial.put(new Wrap(i), i) @@ -246,7 +246,7 @@ object SnapshotSpec extends Spec { class Snapshooter extends Thread { setName("Snapshooter") - override def run() { + override def run(): Unit = { for (k <- 0 until snaptimes) { val snap = ct.snapshot() for (i <- 0 until sz) snap.remove(new Wrap(i)) diff --git a/tests/pending/run/ctries-old/concmap.scala b/tests/pending/run/ctries-old/concmap.scala index affc6fe29..e08b28d43 100644 --- a/tests/pending/run/ctries-old/concmap.scala +++ b/tests/pending/run/ctries-old/concmap.scala @@ -10,7 +10,7 @@ object ConcurrentMapSpec extends Spec { val initsz = 500 val secondsz = 750 - def test() { + def test(): Unit = { "support put" in { val ct = new TrieMap[Wrap, Int] for (i <- 0 until initsz) assert(ct.put(new Wrap(i), i) == None) @@ -62,7 +62,7 @@ object ConcurrentMapSpec extends Spec { for (i <- 0 until sz) ct.update(new Wrap(i), i) class Updater(index: Int, offs: Int) extends Thread { - override def run() { + override def run(): Unit = { var repeats = 0 for (i <- 0 until sz) { val j = (offs + i) % sz @@ -94,7 +94,7 @@ object ConcurrentMapSpec extends Spec { val sz = 110000 class Updater(offs: Int) extends Thread { - override def run() { + override def run(): Unit = { for (i <- 0 until sz) { val j = (offs + i) % sz ct.putIfAbsent(new Wrap(j), j) @@ -116,7 +116,7 @@ object ConcurrentMapSpec extends Spec { for (i <- 0 until sz) ct.update(new Wrap(i), i) class Remover(offs: Int) extends Thread { - override def run() { + override def run(): Unit = { for (i <- 0 until sz) { val j = (offs + i) % sz ct.remove(new Wrap(j), j) @@ -138,7 +138,7 @@ object ConcurrentMapSpec extends Spec { for (i <- 0 until sz) ct(new Wrap(i)) = i class Modifier(index: Int, offs: Int) extends Thread { - override def run() { + override def run(): Unit = { for (j <- 0 until sz) { val i = (offs + j) % sz var success = false diff --git a/tests/pending/run/ctries-old/iterator.scala b/tests/pending/run/ctries-old/iterator.scala index 127f6c9f0..d304cf0d6 100644 --- a/tests/pending/run/ctries-old/iterator.scala +++ b/tests/pending/run/ctries-old/iterator.scala @@ -10,7 +10,7 @@ import Test.Spec object IteratorSpec extends Spec { - def test() { + def test(): Unit = { "work for an empty trie" in { val ct = new TrieMap val it = ct.iterator @@ -19,7 +19,7 @@ object IteratorSpec extends Spec { evaluating { it.next() }.shouldProduce [NoSuchElementException] } - def nonEmptyIteratorCheck(sz: Int) { + def nonEmptyIteratorCheck(sz: Int): Unit = { val ct = new TrieMap[Wrap, Int] for (i <- 0 until sz) ct.put(new Wrap(i), i) @@ -84,7 +84,7 @@ object IteratorSpec extends Spec { nonEmptyIteratorCheck(500000) } - def nonEmptyCollideCheck(sz: Int) { + def nonEmptyCollideCheck(sz: Int): Unit = { val ct = new TrieMap[DumbHash, Int] for (i <- 0 until sz) ct.put(new DumbHash(i), i) @@ -129,7 +129,7 @@ object IteratorSpec extends Spec { nonEmptyCollideCheck(5000) } - def assertEqual(a: Map[Wrap, Int], b: Map[Wrap, Int]) { + def assertEqual(a: Map[Wrap, Int], b: Map[Wrap, Int]): Unit = { if (a != b) { println(a.size + " vs " + b.size) // println(a) @@ -149,7 +149,7 @@ object IteratorSpec extends Spec { for (i <- 0 until sz) ct.put(new Wrap(i), i) class Modifier extends Thread { - override def run() { + override def run(): Unit = { for (i <- 0 until sz) ct.putIfAbsent(new Wrap(i), i) match { case Some(_) => ct.remove(new Wrap(i)) case None => @@ -157,9 +157,9 @@ object IteratorSpec extends Spec { } } - def consistentIteration(ct: TrieMap[Wrap, Int], checks: Int) { + def consistentIteration(ct: TrieMap[Wrap, Int], checks: Int): Unit = { class Iter extends Thread { - override def run() { + override def run(): Unit = { val snap = ct.readOnlySnapshot() val initial = mutable.Map[Wrap, Int]() for (kv <- snap) initial += kv @@ -190,7 +190,7 @@ object IteratorSpec extends Spec { for (i <- 0 until sz) ct.put(new Wrap(i), i) class Remover extends Thread { - override def run() { + override def run(): Unit = { for (i <- 0 until sz) { assert(ct.remove(new Wrap(i)) == Some(i)) for (i <- 0 until removerslowdown) ct.get(new Wrap(i)) // slow down, mate @@ -201,7 +201,7 @@ object IteratorSpec extends Spec { def consistentIteration(it: Iterator[(Wrap, Int)]) = { class Iter extends Thread { - override def run() { + override def run(): Unit = { val elems = it.toBuffer if (elems.nonEmpty) { val minelem = elems.minBy((x: (Wrap, Int)) => x._1.i)._1.i @@ -231,7 +231,7 @@ object IteratorSpec extends Spec { val ct = new TrieMap[Wrap, Int] class Inserter extends Thread { - override def run() { + override def run(): Unit = { for (i <- 0 until sz) { assert(ct.put(new Wrap(i), i) == None) for (i <- 0 until inserterslowdown) ct.get(new Wrap(i)) // slow down, mate @@ -242,7 +242,7 @@ object IteratorSpec extends Spec { def consistentIteration(it: Iterator[(Wrap, Int)]) = { class Iter extends Thread { - override def run() { + override def run(): Unit = { val elems = it.toSeq if (elems.nonEmpty) { val maxelem = elems.maxBy((x: (Wrap, Int)) => x._1.i)._1.i diff --git a/tests/pending/run/ctries-old/lnode.scala b/tests/pending/run/ctries-old/lnode.scala index f9eb9ce87..342aeca06 100644 --- a/tests/pending/run/ctries-old/lnode.scala +++ b/tests/pending/run/ctries-old/lnode.scala @@ -10,7 +10,7 @@ object LNodeSpec extends Spec { val initsz = 1500 val secondsz = 1750 - def test() { + def test(): Unit = { "accept elements with the same hash codes" in { val ct = new TrieMap[DumbHash, Int] for (i <- 0 until initsz) ct.update(new DumbHash(i), i) diff --git a/tests/pending/run/ctries-old/main.scala b/tests/pending/run/ctries-old/main.scala index 77161fed2..09401a371 100644 --- a/tests/pending/run/ctries-old/main.scala +++ b/tests/pending/run/ctries-old/main.scala @@ -8,7 +8,7 @@ @deprecated("Suppress warnings", since="2.11") object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { ConcurrentMapSpec.test() IteratorSpec.test() LNodeSpec.test() @@ -19,17 +19,17 @@ object Test { trait Spec { - implicit def implicitously = scala.language.implicitConversions - implicit def reflectively = scala.language.reflectiveCalls + implicit def implicitously: languageFeature.implicitConversions = scala.language.implicitConversions + implicit def reflectively : languageFeature.reflectiveCalls = scala.language.reflectiveCalls - implicit def str2ops(s: String) = new { - def in[U](body: =>U) { + implicit def str2ops(s: String): AnyRef{def in[U](body: => U): Unit} = new { + def in[U](body: =>U): Unit = { // just execute body body } } - implicit def any2ops(a: Any) = new { + implicit def any2ops(a: Any): AnyRef{def shouldEqual(other: Any): Unit} = new { def shouldEqual(other: Any) = assert(a == other) } diff --git a/tests/pending/run/ctries-old/snapshot.scala b/tests/pending/run/ctries-old/snapshot.scala index dfc2034e5..92232c7e4 100644 --- a/tests/pending/run/ctries-old/snapshot.scala +++ b/tests/pending/run/ctries-old/snapshot.scala @@ -10,7 +10,7 @@ import Test.Spec object SnapshotSpec extends Spec { - def test() { + def test(): Unit = { "support snapshots" in { val ctn = new TrieMap ctn.snapshot() @@ -26,7 +26,7 @@ object SnapshotSpec extends Spec { val sz = 4000 class Worker(trie: TrieMap[Wrap, Int]) extends Thread { - override def run() { + override def run(): Unit = { for (i <- 0 until sz) { assert(trie.remove(new Wrap(i)) == Some(i)) for (j <- 0 until sz) @@ -53,7 +53,7 @@ object SnapshotSpec extends Spec { } } - def consistentReadOnly(name: String, readonly: Map[Wrap, Int], sz: Int, N: Int) { + def consistentReadOnly(name: String, readonly: Map[Wrap, Int], sz: Int, N: Int): Unit = { @volatile var e: Exception = null // reads possible entries once and stores them @@ -68,7 +68,7 @@ object SnapshotSpec extends Spec { case ex: Exception => e = ex } - def check() { + def check(): Unit = { val initial = mutable.Map[Wrap, Int]() for (i <- 0 until sz) trie.get(new Wrap(i)) match { case Some(i) => initial.put(new Wrap(i), i) @@ -100,7 +100,7 @@ object SnapshotSpec extends Spec { class Modifier(trie: TrieMap[Wrap, Int], index: Int, rep: Int, sz: Int) extends Thread { setName("Modifier %d".format(index)) - override def run() { + override def run(): Unit = { for (k <- 0 until rep) { for (i <- 0 until sz) trie.putIfAbsent(new Wrap(i), i) match { case Some(_) => trie.remove(new Wrap(i)) @@ -114,7 +114,7 @@ object SnapshotSpec extends Spec { class Remover(trie: TrieMap[Wrap, Int], index: Int, totremovers: Int, sz: Int) extends Thread { setName("Remover %d".format(index)) - override def run() { + override def run(): Unit = { for (i <- 0 until sz) trie.remove(new Wrap((i + sz / totremovers * index) % sz)) } } @@ -166,7 +166,7 @@ object SnapshotSpec extends Spec { threads.foreach(_.join()) } - def consistentNonReadOnly(name: String, trie: TrieMap[Wrap, Int], sz: Int, N: Int) { + def consistentNonReadOnly(name: String, trie: TrieMap[Wrap, Int], sz: Int, N: Int): Unit = { @volatile var e: Exception = null // reads possible entries once and stores them @@ -181,7 +181,7 @@ object SnapshotSpec extends Spec { case ex: Exception => e = ex } - def check() { + def check(): Unit = { val initial = mutable.Map[Wrap, Int]() for (i <- 0 until sz) trie.get(new Wrap(i)) match { case Some(i) => initial.put(new Wrap(i), i) @@ -247,7 +247,7 @@ object SnapshotSpec extends Spec { class Snapshooter extends Thread { setName("Snapshooter") - override def run() { + override def run(): Unit = { for (k <- 0 until snaptimes) { val snap = ct.snapshot() for (i <- 0 until sz) snap.remove(new Wrap(i)) diff --git a/tests/pending/run/deeps.scala b/tests/pending/run/deeps.scala index 6049cc602..0cb6d6231 100644 --- a/tests/pending/run/deeps.scala +++ b/tests/pending/run/deeps.scala @@ -6,28 +6,28 @@ // need to revisit array equqality object Test { - def testEquals1 { + def testEquals1: Unit = { println(Array(1) == Array(1)) println(Array(1) equals Array(1)) println(Array(1).deep == Array(1).deep) println } - def testEquals2 { + def testEquals2: Unit = { println(Array(Array(1), Array(2)) == Array(Array(1), Array(2))) println(Array(Array(1), Array(2)) equals Array(Array(1), Array(2))) println(Array(Array(1), Array(2)).deep equals Array(Array(1), Array(2)).deep) println } - def testEquals3 { + def testEquals3: Unit = { val a1 = Array(1) val b1 = Array(1) val a2 = Array(a1, b1) val b2 = Array(a1, b1) val a3 = Array(a2, b2) val b3 = Array(a2, b2) - def test[T](x: Array[T], y: Array[T]) { + def test[T](x: Array[T], y: Array[T]): Unit = { println("x=" + x.deep.toString) println("y=" + y.deep.toString) println(x == y) @@ -40,7 +40,7 @@ object Test { test(a3, b3) } - def testEquals4 { + def testEquals4: Unit = { println("boo:and:foo".split(':') == "boo:and:foo".split(':')) println("boo:and:foo".split(':') equals "boo:and:foo".split(':')) println("boo:and:foo".split(':').deep == "boo:and:foo".split(':').deep) @@ -52,13 +52,13 @@ object Test { println(xs.toArray.deep == ys.toArray.deep) } - def testToString1 { + def testToString1: Unit = { def sweep(s: String) = ( s.replaceAll("D@[0-9a-fA-F]+", "D@0000000") .replaceAll("Z@[0-9a-fA-F]+", "Z@0000000") .replaceAll(";@[0-9a-fA-F]+", ";@0000000") ) - def test[T](a: Array[T]) { + def test[T](a: Array[T]): Unit = { println(sweep(a.deep.toString)) println(a.deep.toString) println(a.deep.mkString("[", ";", "]")) @@ -88,14 +88,14 @@ object Test { test(sa3) } - def testToString2 { + def testToString2: Unit = { println(Array(Array(true, false), Array(false)).deep.mkString("[", "; ", "]")) println(Array(Array('1', '2'), Array('3')).deep.mkString("[", "; ", "]")) println(Array(Array(1, 2), Array(3)).deep.mkString("[", "; ", "]")) println } - def testToString3 { + def testToString3: Unit = { println("boo:and:foo".split(':').deep.toString) val xs = new java.util.ArrayList[String](); xs.add("a") diff --git a/tests/pending/run/delambdafy-dependent-on-param-subst-2.scala b/tests/pending/run/delambdafy-dependent-on-param-subst-2.scala index 7b6fc597e..4f7b2dc6e 100644 --- a/tests/pending/run/delambdafy-dependent-on-param-subst-2.scala +++ b/tests/pending/run/delambdafy-dependent-on-param-subst-2.scala @@ -6,7 +6,7 @@ class C class A { class C } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val a = new A // class O extends M[a.C] { def m(x: a.C) = true } diff --git a/tests/pending/run/delambdafy-dependent-on-param-subst.scala b/tests/pending/run/delambdafy-dependent-on-param-subst.scala index 7b6fc597e..4f7b2dc6e 100644 --- a/tests/pending/run/delambdafy-dependent-on-param-subst.scala +++ b/tests/pending/run/delambdafy-dependent-on-param-subst.scala @@ -6,7 +6,7 @@ class C class A { class C } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val a = new A // class O extends M[a.C] { def m(x: a.C) = true } diff --git a/tests/pending/run/delambdafy-nested-by-name.scala b/tests/pending/run/delambdafy-nested-by-name.scala index 4498b3308..37aa86a04 100644 --- a/tests/pending/run/delambdafy-nested-by-name.scala +++ b/tests/pending/run/delambdafy-nested-by-name.scala @@ -5,7 +5,7 @@ object Test { def meth1(arg1: => String) = arg1 def meth2(arg2: => String) = meth1({println("hello"); arg2}) - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println(meth2("world")) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/delay-bad.scala b/tests/pending/run/delay-bad.scala index 43acc1ea3..f29155109 100644 --- a/tests/pending/run/delay-bad.scala +++ b/tests/pending/run/delay-bad.scala @@ -44,7 +44,7 @@ class E() extends D() { object Test { def p(msg: String) = println("\n\n// " + msg) - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val f: A => Unit = _ => () p("new C { }") @@ -60,17 +60,37 @@ object Test { p("new D() { val x = 5 }") f(new D() { val x = 5 }) p("new { val x = 5 } with D()") - f(new { val x = 5 } with D()) + f(new D() { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val x = 5 +// END copied early initializers +}) p("new E() { val x = 5 }") f(new E() { val x = 5 }) p("new { val x = 5 } with E()") - f(new { val x = 5 } with E()) + f(new E() { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val x = 5 +// END copied early initializers +}) p("new { val x = 5 } with E() { }") - f(new { val x = 5 } with E() { }) + f(new E() { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val x = 5 +// END copied early initializers + }) p("new { val x = 5 } with E() { 5 }") - f(new { val x = 5 } with E() { 5 }) + f(new E() { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val x = 5 +// END copied early initializers + 5 }) println("") } diff --git a/tests/pending/run/delay-good.scala b/tests/pending/run/delay-good.scala index 2e4487b92..dbeb993a5 100644 --- a/tests/pending/run/delay-good.scala +++ b/tests/pending/run/delay-good.scala @@ -44,7 +44,7 @@ class E() extends D() { object Test { def p(msg: String) = println("\n\n// " + msg) - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val f: A => Unit = _.postConstructionCode p("new C { }") @@ -60,17 +60,37 @@ object Test { p("new D() { val x = 5 }") f(new D() { val x = 5 }) p("new { val x = 5 } with D()") - f(new { val x = 5 } with D()) + f(new D() { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val x = 5 +// END copied early initializers +}) p("new E() { val x = 5 }") f(new E() { val x = 5 }) p("new { val x = 5 } with E()") - f(new { val x = 5 } with E()) + f(new E() { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val x = 5 +// END copied early initializers +}) p("new { val x = 5 } with E() { }") - f(new { val x = 5 } with E() { }) + f(new E() { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val x = 5 +// END copied early initializers + }) p("new { val x = 5 } with E() { 5 }") - f(new { val x = 5 } with E() { 5 }) + f(new E() { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val x = 5 +// END copied early initializers + 5 }) println("") } diff --git a/tests/pending/run/deprecate-early-type-defs.scala b/tests/pending/run/deprecate-early-type-defs.scala index 99e42166f..e5d56e5f8 100644 --- a/tests/pending/run/deprecate-early-type-defs.scala +++ b/tests/pending/run/deprecate-early-type-defs.scala @@ -1 +1,6 @@ -object Test extends { type T = Int } with App
\ No newline at end of file +object Test extends App { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +type T = Int +// END copied early initializers +} diff --git a/tests/pending/run/duplicate-meth.scala b/tests/pending/run/duplicate-meth.scala index 40c0d3d67..481c869d9 100644 --- a/tests/pending/run/duplicate-meth.scala +++ b/tests/pending/run/duplicate-meth.scala @@ -15,7 +15,7 @@ object TestUser extends TestUser { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { TestUser.objMeth // no-op, just check that it passes verification println("verified!") diff --git a/tests/pending/run/duration-coarsest.scala b/tests/pending/run/duration-coarsest.scala index 51cb79287..21d35c9b2 100644 --- a/tests/pending/run/duration-coarsest.scala +++ b/tests/pending/run/duration-coarsest.scala @@ -25,4 +25,4 @@ object Test extends App { 23 hours, 40 days ) foreach (x => assert(x == x.toCoarsest, x)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/elidable-opt.scala b/tests/pending/run/elidable-opt.scala index a2f29d2ca..7f3b8011d 100644 --- a/tests/pending/run/elidable-opt.scala +++ b/tests/pending/run/elidable-opt.scala @@ -2,10 +2,10 @@ import annotation._ import elidable._ trait T { - @elidable(FINEST) def f1() - @elidable(SEVERE) def f2() + @elidable(FINEST) def f1(): Unit + @elidable(SEVERE) def f2(): Unit @elidable(FINEST) def f3() = assert(false, "Should have been elided.") - def f4() + def f4(): Unit } class C extends T { diff --git a/tests/pending/run/elidable.scala b/tests/pending/run/elidable.scala index a2f29d2ca..7f3b8011d 100644 --- a/tests/pending/run/elidable.scala +++ b/tests/pending/run/elidable.scala @@ -2,10 +2,10 @@ import annotation._ import elidable._ trait T { - @elidable(FINEST) def f1() - @elidable(SEVERE) def f2() + @elidable(FINEST) def f1(): Unit + @elidable(SEVERE) def f2(): Unit @elidable(FINEST) def f3() = assert(false, "Should have been elided.") - def f4() + def f4(): Unit } class C extends T { diff --git a/tests/pending/run/enrich-gentraversable.scala b/tests/pending/run/enrich-gentraversable.scala index 36412e650..7d8b6bdb3 100644 --- a/tests/pending/run/enrich-gentraversable.scala +++ b/tests/pending/run/enrich-gentraversable.scala @@ -5,7 +5,7 @@ object Test extends App { import scala.collection.{GenTraversableOnce,GenTraversableLike} import scala.collection.generic._ - def typed[T](t : => T) {} + def typed[T](t : => T): Unit = {} def testTraversableLike = { class FilterMapImpl[A, Repr](val r: GenTraversableLike[A, Repr]) /* extends AnyVal */ { final def filterMap[B, That](f: A => Option[B])(implicit cbf: CanBuildFrom[Repr, B, That]): That = diff --git a/tests/pending/run/enums.scala b/tests/pending/run/enums.scala index 3aad7ec32..7630b174e 100644 --- a/tests/pending/run/enums.scala +++ b/tests/pending/run/enums.scala @@ -85,7 +85,7 @@ object Test5 { val Mon, Tue, Wed, Thu, Fri, Sat, Sun = Value } - def run { + def run: Unit = { val s1 = D1.ValueSet(D1.North, D1.East) val s2 = D2.North + D2.East println(s1) @@ -117,7 +117,7 @@ object SerializationTest { prime } - def run { + def run: Unit = { serialize(new B()) serialize(new A()) } diff --git a/tests/pending/run/exceptions-nest.scala b/tests/pending/run/exceptions-nest.scala index 432d600d1..4543faae6 100644 --- a/tests/pending/run/exceptions-nest.scala +++ b/tests/pending/run/exceptions-nest.scala @@ -133,7 +133,7 @@ object Test extends App { catch { case e if (x10 == 1) => 1 } } - def test11 { + def test11: Unit = { try { () } catch { case e: Throwable => () } } diff --git a/tests/pending/run/existentials.scala b/tests/pending/run/existentials.scala index bdd6fb93e..d900e7ad9 100644 --- a/tests/pending/run/existentials.scala +++ b/tests/pending/run/existentials.scala @@ -4,9 +4,9 @@ import scala.language.reflectiveCalls class Foo { class Line { case class Cell[T](var x: T) - def f[T](x: Any): Cell[t1] forSome { type t1 } = x match { case y: Cell[t] => y } + def f[T](x: Any): Line.this.Cell[_] = x match { case y: Cell[t] => y } - var x: Cell[T] forSome { type T } = new Cell(1) + var x: Line.this.Cell[_]Line.this.Cell[_] = new Cell(1) println({ x = new Cell("abc"); x }) } } @@ -34,13 +34,13 @@ object LUB { def y = C("abc") var coinflip: Boolean = _ def z = if (coinflip) x else y - def zz: C[_1] forSome { type _1 >: Int with java.lang.String } = z + def zz: C[_ >: Int with String] = z def zzs: C[_ >: Int with java.lang.String] = z } object Bug1189 { case class Cell[T](x: T) - type U = Cell[T1] forSome { type T1 } + type U = Bug1189.Cell[_] def f(x: Any): U = x match { case y: Cell[_] => y } var x: U = Cell(1) @@ -56,16 +56,16 @@ object Bug1189 { 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 + val y: (C[X], C[Y]) forSome { type X; type Y }(C[X], C[Y]) forSome { type X; type Y } = x - def foo(x : Counter[T] { def name : String } forSome { type T }) = x match { + def foo(x : Counter[T]{def name: String} forSome { type T }) = x match { case ctr: Counter[t] => val c = ctr.newCounter println(ctr.name+" "+ctr.get(ctr.inc(ctr.inc(c)))) case _ => } - def fooW(x : Counter[T] { def name : String } forSome { type T }) = x match { + def fooW(x : Counter[T]{def name: String} forSome { type T }) = x match { case ctr: Counter[t] => val c = ctr.newCounter println(ctr.name+" "+ctr.get(ctr.inc(ctr.inc(c)))) @@ -86,7 +86,7 @@ object Test extends App { def name = "Float" } - var ex: Counter[T] forSome { type T } = _ + var ex: Counter[_]Counter[_] = _ ex = ci ex = cf @@ -109,7 +109,9 @@ trait SubFooBar[B <: Option[_]] extends FooBar[B] object Test1 { - var pc: List[Product with (Counter[T] forSome { type T })] = List() + var pc: List[Product with (Product with Counter[T] forSome { + type T +})] = List() def f() = pc pc = f() } diff --git a/tests/pending/run/existentials3-new.scala b/tests/pending/run/existentials3-new.scala index 5dfd7fb39..102153e84 100644 --- a/tests/pending/run/existentials3-new.scala +++ b/tests/pending/run/existentials3-new.scala @@ -74,7 +74,7 @@ object Test { object Misc { trait Bippy { def bippy = "I'm Bippy!" } object o1 { - def f1 = { trait A extends Seq[U forSome { type U <: Bippy }] ; abstract class B extends A ; trait C extends B ; (null: C) } + def f1 = { trait A extends Seq[U forSome { type U <: Misc.Bippy }] ; abstract class B extends A ; trait C extends B ; (null: C) } def f2 = f1.head.bippy } def g1 = o1.f1 _ diff --git a/tests/pending/run/existentials3-old.scala b/tests/pending/run/existentials3-old.scala index c021c0e71..d305800de 100644 --- a/tests/pending/run/existentials3-old.scala +++ b/tests/pending/run/existentials3-old.scala @@ -67,7 +67,7 @@ object Test { object Misc { trait Bippy { def bippy = "I'm Bippy!" } object o1 { - def f1 = { trait A extends Seq[U forSome { type U <: Bippy }] ; abstract class B extends A ; trait C extends B ; (null: C) } + def f1 = { trait A extends Seq[U forSome { type U <: Misc.Bippy }] ; abstract class B extends A ; trait C extends B ; (null: C) } def f2 = f1.head.bippy } def g1 = o1.f1 _ diff --git a/tests/pending/run/finally.scala b/tests/pending/run/finally.scala index 2c01edaae..92832165d 100644 --- a/tests/pending/run/finally.scala +++ b/tests/pending/run/finally.scala @@ -3,7 +3,7 @@ object Test extends App { // test that finally is not covered by any exception handlers. - def throwCatchFinally { + def throwCatchFinally: Unit = { try { bar } catch { @@ -12,7 +12,7 @@ object Test extends App { } // test that finally is not covered by any exception handlers. - def bar { + def bar: Unit = { try { println("hi") } @@ -26,7 +26,7 @@ object Test extends App { } // return in catch (finally is executed) - def retCatch { + def retCatch: Unit = { try { throw new Exception } catch { @@ -37,7 +37,7 @@ object Test extends App { } // throw in catch (finally is executed, exception propagated) - def throwCatch { + def throwCatch: Unit = { try { throw new Exception } catch { @@ -48,7 +48,7 @@ object Test extends App { } // return inside body (finally is executed) - def retBody { + def retBody: Unit = { try { return } catch { @@ -59,7 +59,7 @@ object Test extends App { } // throw inside body (finally and catch are executed) - def throwBody { + def throwBody: Unit = { try { throw new Exception } catch { @@ -69,7 +69,7 @@ object Test extends App { } // return inside finally (each finally is executed once) - def retFinally { + def retFinally: Unit = { try { try println("body") finally { @@ -81,7 +81,7 @@ object Test extends App { // throw inside finally (finally is executed once, exception is propagated) - def throwFinally { + def throwFinally: Unit = { try { try println("body") finally { @@ -106,7 +106,7 @@ object Test extends App { println("in finally 2") } - def test[A](m: => A, name: String) { + def test[A](m: => A, name: String): Unit = { println("Running %s".format(name)) try { m diff --git a/tests/pending/run/finalvar.scala b/tests/pending/run/finalvar.scala index 010813e52..184b78e98 100644 --- a/tests/pending/run/finalvar.scala +++ b/tests/pending/run/finalvar.scala @@ -34,4 +34,4 @@ object Test { } class C { var w = 1 ; def ten = this.w = 10 } -class D extends C { override var w = 2 }
\ No newline at end of file +class D extends C { override var w = 2 } diff --git a/tests/pending/run/fors.scala b/tests/pending/run/fors.scala index c778df3e2..02b513755 100644 --- a/tests/pending/run/fors.scala +++ b/tests/pending/run/fors.scala @@ -14,7 +14,7 @@ object Test extends App { /////////////////// old syntax /////////////////// - def testOld { + def testOld: Unit = { println("\ntestOld") // lists @@ -46,7 +46,7 @@ object Test extends App { /////////////////// new syntax /////////////////// - def testNew { + def testNew: Unit = { println("\ntestNew") // lists diff --git a/tests/pending/run/forvaleq.scala b/tests/pending/run/forvaleq.scala index 8c1824a76..dac3234a6 100644 --- a/tests/pending/run/forvaleq.scala +++ b/tests/pending/run/forvaleq.scala @@ -87,5 +87,5 @@ object Test { println("called " + count + " times") } - def main(args: Array[String]) {} + def main(args: Array[String]): Unit = {} } diff --git a/tests/pending/run/freetypes_false_alarm1.scala b/tests/pending/run/freetypes_false_alarm1.scala index 8d6797f79..e9396f3f0 100644 --- a/tests/pending/run/freetypes_false_alarm1.scala +++ b/tests/pending/run/freetypes_false_alarm1.scala @@ -7,4 +7,4 @@ object Test extends App { val tpe: ru.Type = ru.typeOf[List[Int]] println(tpe) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/freetypes_false_alarm2.scala b/tests/pending/run/freetypes_false_alarm2.scala index a517f7396..4b6633fa2 100644 --- a/tests/pending/run/freetypes_false_alarm2.scala +++ b/tests/pending/run/freetypes_false_alarm2.scala @@ -6,4 +6,4 @@ import internal._ object Test extends App { val tpe = typeOf[ru.Type] println(isFreeType(tpe.typeSymbol)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/future-flatmap-exec-count.scala b/tests/pending/run/future-flatmap-exec-count.scala index 86c37be93..849beb6b1 100644 --- a/tests/pending/run/future-flatmap-exec-count.scala +++ b/tests/pending/run/future-flatmap-exec-count.scala @@ -2,7 +2,7 @@ import scala.concurrent._ import java.util.concurrent.atomic.AtomicInteger object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { test() } diff --git a/tests/pending/run/getClassTest-new.scala b/tests/pending/run/getClassTest-new.scala index 7d8ec930f..9e111bea1 100644 --- a/tests/pending/run/getClassTest-new.scala +++ b/tests/pending/run/getClassTest-new.scala @@ -65,4 +65,4 @@ object Test { returnTypes[AnyRefs] foreach println returnTypes[MoreAnyRefs] foreach println } -}
\ No newline at end of file +} diff --git a/tests/pending/run/groupby.scala b/tests/pending/run/groupby.scala index a751e65e8..9a33ae289 100644 --- a/tests/pending/run/groupby.scala +++ b/tests/pending/run/groupby.scala @@ -4,7 +4,7 @@ // Fixes #3422 object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val arr = Array.range(0,10) val map = arr groupBy (_%2) val v1 = map(0) diff --git a/tests/pending/run/hashCodeDistribution.scala b/tests/pending/run/hashCodeDistribution.scala index 5be9d1db6..284f3d977 100644 --- a/tests/pending/run/hashCodeDistribution.scala +++ b/tests/pending/run/hashCodeDistribution.scala @@ -14,4 +14,4 @@ object Test { assert(collisionRate < 5, "Collision rate too high: %d / 1000".format(collisionRate)) // println("collisionRate = %d / 1000".format(collisionRate)) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/hashset.scala b/tests/pending/run/hashset.scala index a4d49c142..624ca2a52 100644 --- a/tests/pending/run/hashset.scala +++ b/tests/pending/run/hashset.scala @@ -16,7 +16,7 @@ object Test extends App { }) - def test(creator : Creator) { + def test(creator : Creator): Unit = { println("*** " + creator.hashSetType + " primitives") val h1 = creator.create[Int] for (i <- 0 until 20) h1 += i @@ -45,4 +45,4 @@ object Test extends App { def create[A] : GenSet[A] with Cloneable with FlatHashTable[A] with Growable[A] with Shrinkable[A] def hashSetType : String } -}
\ No newline at end of file +} diff --git a/tests/pending/run/hashsetremove.scala b/tests/pending/run/hashsetremove.scala index 7b82a9909..1cfb5ed63 100644 --- a/tests/pending/run/hashsetremove.scala +++ b/tests/pending/run/hashsetremove.scala @@ -10,4 +10,4 @@ object Test extends App { println(s"contains 1 should be false, was ${h contains 1}") println(s"remove 1 should be false, was ${h remove 1}") println(s"contains 1 should be false, was ${h contains 1}") - }
\ No newline at end of file + } diff --git a/tests/pending/run/idempotency-case-classes.scala b/tests/pending/run/idempotency-case-classes.scala index 4ad132174..b4938c489 100644 --- a/tests/pending/run/idempotency-case-classes.scala +++ b/tests/pending/run/idempotency-case-classes.scala @@ -19,4 +19,4 @@ object Test extends App { // this is the current behaviour, rather than the desired behavior; see SI-5467 case _: ToolBoxError => println("error!") } -}
\ No newline at end of file +} diff --git a/tests/pending/run/idempotency-extractors.scala b/tests/pending/run/idempotency-extractors.scala index 8c0a0b110..3e5782c8a 100644 --- a/tests/pending/run/idempotency-extractors.scala +++ b/tests/pending/run/idempotency-extractors.scala @@ -19,4 +19,4 @@ object Test extends App { // this is the current behaviour, rather than the desired behavior; see SI-5465 case _: ToolBoxError => println("error!") } -}
\ No newline at end of file +} diff --git a/tests/pending/run/idempotency-labels.scala b/tests/pending/run/idempotency-labels.scala index 084c93d3c..85c5b6111 100644 --- a/tests/pending/run/idempotency-labels.scala +++ b/tests/pending/run/idempotency-labels.scala @@ -19,4 +19,4 @@ object Test extends App { } catch { case _: ToolBoxError => println("error!") } -}
\ No newline at end of file +} diff --git a/tests/pending/run/idempotency-lazy-vals.scala b/tests/pending/run/idempotency-lazy-vals.scala index 9d677caec..c440c2189 100644 --- a/tests/pending/run/idempotency-lazy-vals.scala +++ b/tests/pending/run/idempotency-lazy-vals.scala @@ -24,4 +24,4 @@ object Test extends App { // this is the current behaviour, rather than the desired behavior; see SI-5466 case _: ToolBoxError => println("error!") } -}
\ No newline at end of file +} diff --git a/tests/pending/run/idempotency-this.scala b/tests/pending/run/idempotency-this.scala index 26917ab74..1bd71d847 100644 --- a/tests/pending/run/idempotency-this.scala +++ b/tests/pending/run/idempotency-this.scala @@ -19,4 +19,4 @@ object Test extends App { // this is the current behaviour, rather than the desired behavior; see SI-5705 case _: ToolBoxError => println("error!") } -}
\ No newline at end of file +} diff --git a/tests/pending/run/imain.scala b/tests/pending/run/imain.scala index c164fb53e..cc939e39f 100644 --- a/tests/pending/run/imain.scala +++ b/tests/pending/run/imain.scala @@ -3,9 +3,9 @@ object Test { import interpreter._ import java.io.PrintWriter - class NullOutputStream extends OutputStream { def write(b: Int) { } } + class NullOutputStream extends OutputStream { def write(b: Int): Unit = { } } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val settings = new Settings settings.classpath.value = System.getProperty("java.class.path") diff --git a/tests/pending/run/impconvtimes.scala b/tests/pending/run/impconvtimes.scala index 477a16a89..0dbbf7bca 100644 --- a/tests/pending/run/impconvtimes.scala +++ b/tests/pending/run/impconvtimes.scala @@ -9,7 +9,7 @@ object Test { def *(newUnit: Unit) = Measure(scalar, newUnit) } - implicit def double2Measure(scalar: Double) = + implicit def double2Measure(scalar: Double): Test.Measure = Measure(scalar, NoUnit) diff --git a/tests/pending/run/implicits.scala b/tests/pending/run/implicits.scala index 5681a9d48..fbc8536c0 100644 --- a/tests/pending/run/implicits.scala +++ b/tests/pending/run/implicits.scala @@ -2,7 +2,7 @@ import scala.language.implicitConversions object A { object B { - implicit def int2string(x: Int) = "["+x.toString+"]" + implicit def int2string(x: Int): String = "["+x.toString+"]" } } diff --git a/tests/pending/run/infiniteloop.scala b/tests/pending/run/infiniteloop.scala index 06926cec1..57cfa8d37 100644 --- a/tests/pending/run/infiniteloop.scala +++ b/tests/pending/run/infiniteloop.scala @@ -1,7 +1,7 @@ /** Tests the optimiser (not to loop on 'reverse'). */ object Test extends App { - def foo { + def foo: Unit = { val s3 = Stream.range(1, 1000) //100000 (ticket #153: Stackoverflow) // ticket #153 diff --git a/tests/pending/run/inner-obj-auto.scala b/tests/pending/run/inner-obj-auto.scala index 00ea5119c..a044ba704 100644 --- a/tests/pending/run/inner-obj-auto.scala +++ b/tests/pending/run/inner-obj-auto.scala @@ -19,7 +19,7 @@ class Class2_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -29,10 +29,10 @@ class Class2_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Class1_2).run } + def run: Unit = { (new Class1_2).run } } @@ -48,7 +48,7 @@ object Object3_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -58,10 +58,10 @@ object Object3_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Class1_2).run } // trigger + def run: Unit = { (new Class1_2).run } // trigger } @@ -77,7 +77,7 @@ trait Trait4_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -87,10 +87,10 @@ trait Trait4_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Class1_2).run } + def run: Unit = { (new Class1_2).run } } @@ -106,7 +106,7 @@ class Class6_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -116,10 +116,10 @@ class Class6_1 { } } - def run { runTest } // trigger + def run: Unit = { runTest } // trigger } - def run { Object5_2.run } + def run: Unit = { Object5_2.run } } @@ -135,7 +135,7 @@ object Object7_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -145,10 +145,10 @@ object Object7_1 { } } - def run { runTest } // trigger + def run: Unit = { runTest } // trigger } - def run { Object5_2.run } // trigger + def run: Unit = { Object5_2.run } // trigger } @@ -164,7 +164,7 @@ trait Trait8_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -174,10 +174,10 @@ trait Trait8_1 { } } - def run { runTest } // trigger + def run: Unit = { runTest } // trigger } - def run { Object5_2.run } + def run: Unit = { Object5_2.run } } @@ -193,7 +193,7 @@ class Class10_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -203,10 +203,10 @@ class Class10_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Trait9_2 {}).run } + def run: Unit = { (new Trait9_2 {}).run } } @@ -222,7 +222,7 @@ object Object11_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -232,10 +232,10 @@ object Object11_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Trait9_2 {}).run } // trigger + def run: Unit = { (new Trait9_2 {}).run } // trigger } @@ -251,7 +251,7 @@ trait Trait12_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -261,16 +261,16 @@ trait Trait12_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Trait9_2 {}).run } + def run: Unit = { (new Trait9_2 {}).run } } class Class14_1 { - def method13_2 { + def method13_2: Unit = { var ObjCounter = 0 object Obj { ObjCounter += 1} @@ -280,7 +280,7 @@ class Class14_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -293,13 +293,13 @@ class Class14_1 { runTest // trigger } - def run { method13_2 } + def run: Unit = { method13_2 } } object Object15_1 { - def method13_2 { + def method13_2: Unit = { var ObjCounter = 0 object Obj { ObjCounter += 1} @@ -309,7 +309,7 @@ object Object15_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -322,13 +322,13 @@ object Object15_1 { runTest // trigger } - def run { method13_2 } // trigger + def run: Unit = { method13_2 } // trigger } trait Trait16_1 { - def method13_2 { + def method13_2: Unit = { var ObjCounter = 0 object Obj { ObjCounter += 1} @@ -338,7 +338,7 @@ trait Trait16_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -351,13 +351,13 @@ trait Trait16_1 { runTest // trigger } - def run { method13_2 } + def run: Unit = { method13_2 } } class Class18_1 { - private def method17_2 { + private def method17_2: Unit = { var ObjCounter = 0 object Obj { ObjCounter += 1} @@ -367,7 +367,7 @@ class Class18_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -380,13 +380,13 @@ class Class18_1 { runTest // trigger } - def run { method17_2 } + def run: Unit = { method17_2 } } object Object19_1 { - private def method17_2 { + private def method17_2: Unit = { var ObjCounter = 0 object Obj { ObjCounter += 1} @@ -396,7 +396,7 @@ object Object19_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -409,13 +409,13 @@ object Object19_1 { runTest // trigger } - def run { method17_2 } // trigger + def run: Unit = { method17_2 } // trigger } trait Trait20_1 { - private def method17_2 { + private def method17_2: Unit = { var ObjCounter = 0 object Obj { ObjCounter += 1} @@ -425,7 +425,7 @@ trait Trait20_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -438,7 +438,7 @@ trait Trait20_1 { runTest // trigger } - def run { method17_2 } + def run: Unit = { method17_2 } } @@ -454,7 +454,7 @@ class Class22_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -467,7 +467,7 @@ class Class22_1 { runTest // trigger } - def run { fun21_2() } + def run: Unit = { fun21_2() } } @@ -483,7 +483,7 @@ object Object23_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -496,7 +496,7 @@ object Object23_1 { runTest // trigger } - def run { fun21_2() } // trigger + def run: Unit = { fun21_2() } // trigger } @@ -512,7 +512,7 @@ trait Trait24_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -525,7 +525,7 @@ trait Trait24_1 { runTest // trigger } - def run { fun21_2() } + def run: Unit = { fun21_2() } } @@ -542,7 +542,7 @@ class Class26_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -556,7 +556,7 @@ class Class26_1 { } } - def run { (new Class25_2) } + def run: Unit = { (new Class25_2) } } @@ -573,7 +573,7 @@ object Object27_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -587,7 +587,7 @@ object Object27_1 { } } - def run { (new Class25_2) } // trigger + def run: Unit = { (new Class25_2) } // trigger } @@ -604,7 +604,7 @@ trait Trait28_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -618,7 +618,7 @@ trait Trait28_1 { } } - def run { (new Class25_2) } + def run: Unit = { (new Class25_2) } } @@ -635,7 +635,7 @@ class Class30_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -649,7 +649,7 @@ class Class30_1 { } } - def run { (new Trait29_2 {}) } + def run: Unit = { (new Trait29_2 {}) } } @@ -666,7 +666,7 @@ object Object31_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -680,7 +680,7 @@ object Object31_1 { } } - def run { (new Trait29_2 {}) } // trigger + def run: Unit = { (new Trait29_2 {}) } // trigger } @@ -697,7 +697,7 @@ trait Trait32_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -711,7 +711,7 @@ trait Trait32_1 { } } - def run { (new Trait29_2 {}) } + def run: Unit = { (new Trait29_2 {}) } } @@ -727,7 +727,7 @@ class Class34_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -740,7 +740,7 @@ class Class34_1 { runTest // trigger } - def run { lzvalue33_2 } + def run: Unit = { lzvalue33_2 } } @@ -756,7 +756,7 @@ object Object35_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -769,7 +769,7 @@ object Object35_1 { runTest // trigger } - def run { lzvalue33_2 } // trigger + def run: Unit = { lzvalue33_2 } // trigger } @@ -785,7 +785,7 @@ trait Trait36_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -798,7 +798,7 @@ trait Trait36_1 { runTest // trigger } - def run { lzvalue33_2 } + def run: Unit = { lzvalue33_2 } } @@ -814,7 +814,7 @@ class Class38_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -827,7 +827,7 @@ class Class38_1 { runTest // trigger } - def run { value37_2 } + def run: Unit = { value37_2 } } @@ -843,7 +843,7 @@ object Object39_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -856,7 +856,7 @@ object Object39_1 { runTest // trigger } - def run { value37_2 } // trigger + def run: Unit = { value37_2 } // trigger } @@ -872,7 +872,7 @@ trait Trait40_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -885,7 +885,7 @@ trait Trait40_1 { runTest // trigger } - def run { value37_2 } + def run: Unit = { value37_2 } } @@ -901,7 +901,7 @@ class Class42_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -911,10 +911,10 @@ class Class42_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Class41_2).run } + def run: Unit = { (new Class41_2).run } } @@ -930,7 +930,7 @@ object Object43_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -940,10 +940,10 @@ object Object43_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Class41_2).run } // trigger + def run: Unit = { (new Class41_2).run } // trigger } @@ -959,7 +959,7 @@ trait Trait44_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -969,10 +969,10 @@ trait Trait44_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Class41_2).run } + def run: Unit = { (new Class41_2).run } } @@ -988,7 +988,7 @@ class Class46_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -998,10 +998,10 @@ class Class46_1 { } } - def run { runTest } // trigger + def run: Unit = { runTest } // trigger } - def run { Object45_2.run } + def run: Unit = { Object45_2.run } } @@ -1017,7 +1017,7 @@ object Object47_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1027,10 +1027,10 @@ object Object47_1 { } } - def run { runTest } // trigger + def run: Unit = { runTest } // trigger } - def run { Object45_2.run } // trigger + def run: Unit = { Object45_2.run } // trigger } @@ -1046,7 +1046,7 @@ trait Trait48_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1056,10 +1056,10 @@ trait Trait48_1 { } } - def run { runTest } // trigger + def run: Unit = { runTest } // trigger } - def run { Object45_2.run } + def run: Unit = { Object45_2.run } } @@ -1075,7 +1075,7 @@ class Class50_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1085,10 +1085,10 @@ class Class50_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Trait49_2 {}).run } + def run: Unit = { (new Trait49_2 {}).run } } @@ -1104,7 +1104,7 @@ object Object51_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1114,10 +1114,10 @@ object Object51_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Trait49_2 {}).run } // trigger + def run: Unit = { (new Trait49_2 {}).run } // trigger } @@ -1133,7 +1133,7 @@ trait Trait52_1 { x == Obj } - def runTest { + def runTest: Unit = { try { assert(singleThreadedAccess(Obj)) assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1143,10 +1143,10 @@ trait Trait52_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Trait49_2 {}).run } + def run: Unit = { (new Trait49_2 {}).run } } @@ -1157,7 +1157,7 @@ class Class54_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1166,7 +1166,7 @@ class Class54_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1176,10 +1176,10 @@ class Class54_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Class53_2).run } + def run: Unit = { (new Class53_2).run } } @@ -1190,7 +1190,7 @@ object Object55_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1199,7 +1199,7 @@ object Object55_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1209,10 +1209,10 @@ object Object55_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Class53_2).run } // trigger + def run: Unit = { (new Class53_2).run } // trigger } @@ -1223,7 +1223,7 @@ trait Trait56_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1232,7 +1232,7 @@ trait Trait56_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1242,10 +1242,10 @@ trait Trait56_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Class53_2).run } + def run: Unit = { (new Class53_2).run } } @@ -1256,7 +1256,7 @@ class Class58_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1265,7 +1265,7 @@ class Class58_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1275,10 +1275,10 @@ class Class58_1 { } } - def run { runTest } // trigger + def run: Unit = { runTest } // trigger } - def run { Object57_2.run } + def run: Unit = { Object57_2.run } } @@ -1289,7 +1289,7 @@ object Object59_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1298,7 +1298,7 @@ object Object59_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1308,10 +1308,10 @@ object Object59_1 { } } - def run { runTest } // trigger + def run: Unit = { runTest } // trigger } - def run { Object57_2.run } // trigger + def run: Unit = { Object57_2.run } // trigger } @@ -1322,7 +1322,7 @@ trait Trait60_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1331,7 +1331,7 @@ trait Trait60_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1341,10 +1341,10 @@ trait Trait60_1 { } } - def run { runTest } // trigger + def run: Unit = { runTest } // trigger } - def run { Object57_2.run } + def run: Unit = { Object57_2.run } } @@ -1355,7 +1355,7 @@ class Class62_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1364,7 +1364,7 @@ class Class62_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1374,10 +1374,10 @@ class Class62_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Trait61_2 {}).run } + def run: Unit = { (new Trait61_2 {}).run } } @@ -1388,7 +1388,7 @@ object Object63_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1397,7 +1397,7 @@ object Object63_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1407,10 +1407,10 @@ object Object63_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Trait61_2 {}).run } // trigger + def run: Unit = { (new Trait61_2 {}).run } // trigger } @@ -1421,7 +1421,7 @@ trait Trait64_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1430,7 +1430,7 @@ trait Trait64_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1440,21 +1440,21 @@ trait Trait64_1 { } } - def run { runTest } + def run: Unit = { runTest } } - def run { (new Trait61_2 {}).run } + def run: Unit = { (new Trait61_2 {}).run } } class Class66_1 { - def method65_2 { + def method65_2: Unit = { @volatile var ObjCounter = 0 object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1463,7 +1463,7 @@ class Class66_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1476,18 +1476,18 @@ class Class66_1 { runTest // trigger } - def run { method65_2 } + def run: Unit = { method65_2 } } object Object67_1 { - def method65_2 { + def method65_2: Unit = { @volatile var ObjCounter = 0 object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1496,7 +1496,7 @@ object Object67_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1509,18 +1509,18 @@ object Object67_1 { runTest // trigger } - def run { method65_2 } // trigger + def run: Unit = { method65_2 } // trigger } trait Trait68_1 { - def method65_2 { + def method65_2: Unit = { @volatile var ObjCounter = 0 object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1529,7 +1529,7 @@ trait Trait68_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1542,18 +1542,18 @@ trait Trait68_1 { runTest // trigger } - def run { method65_2 } + def run: Unit = { method65_2 } } class Class70_1 { - private def method69_2 { + private def method69_2: Unit = { @volatile var ObjCounter = 0 object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1562,7 +1562,7 @@ class Class70_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1575,18 +1575,18 @@ class Class70_1 { runTest // trigger } - def run { method69_2 } + def run: Unit = { method69_2 } } object Object71_1 { - private def method69_2 { + private def method69_2: Unit = { @volatile var ObjCounter = 0 object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1595,7 +1595,7 @@ object Object71_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1608,18 +1608,18 @@ object Object71_1 { runTest // trigger } - def run { method69_2 } // trigger + def run: Unit = { method69_2 } // trigger } trait Trait72_1 { - private def method69_2 { + private def method69_2: Unit = { @volatile var ObjCounter = 0 object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1628,7 +1628,7 @@ trait Trait72_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1641,7 +1641,7 @@ trait Trait72_1 { runTest // trigger } - def run { method69_2 } + def run: Unit = { method69_2 } } @@ -1652,7 +1652,7 @@ class Class74_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1661,7 +1661,7 @@ class Class74_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1674,7 +1674,7 @@ class Class74_1 { runTest // trigger } - def run { fun73_2() } + def run: Unit = { fun73_2() } } @@ -1685,7 +1685,7 @@ object Object75_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1694,7 +1694,7 @@ object Object75_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1707,7 +1707,7 @@ object Object75_1 { runTest // trigger } - def run { fun73_2() } // trigger + def run: Unit = { fun73_2() } // trigger } @@ -1718,7 +1718,7 @@ trait Trait76_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1727,7 +1727,7 @@ trait Trait76_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1740,7 +1740,7 @@ trait Trait76_1 { runTest // trigger } - def run { fun73_2() } + def run: Unit = { fun73_2() } } @@ -1752,7 +1752,7 @@ class Class78_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1761,7 +1761,7 @@ class Class78_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1775,7 +1775,7 @@ class Class78_1 { } } - def run { (new Class77_2) } + def run: Unit = { (new Class77_2) } } @@ -1787,7 +1787,7 @@ object Object79_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1796,7 +1796,7 @@ object Object79_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1810,7 +1810,7 @@ object Object79_1 { } } - def run { (new Class77_2) } // trigger + def run: Unit = { (new Class77_2) } // trigger } @@ -1822,7 +1822,7 @@ trait Trait80_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1831,7 +1831,7 @@ trait Trait80_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1845,7 +1845,7 @@ trait Trait80_1 { } } - def run { (new Class77_2) } + def run: Unit = { (new Class77_2) } } @@ -1857,7 +1857,7 @@ class Class82_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1866,7 +1866,7 @@ class Class82_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1880,7 +1880,7 @@ class Class82_1 { } } - def run { (new Trait81_2 {}) } + def run: Unit = { (new Trait81_2 {}) } } @@ -1892,7 +1892,7 @@ object Object83_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1901,7 +1901,7 @@ object Object83_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1915,7 +1915,7 @@ object Object83_1 { } } - def run { (new Trait81_2 {}) } // trigger + def run: Unit = { (new Trait81_2 {}) } // trigger } @@ -1927,7 +1927,7 @@ trait Trait84_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1936,7 +1936,7 @@ trait Trait84_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1950,7 +1950,7 @@ trait Trait84_1 { } } - def run { (new Trait81_2 {}) } + def run: Unit = { (new Trait81_2 {}) } } @@ -1961,7 +1961,7 @@ class Class90_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -1970,7 +1970,7 @@ class Class90_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -1983,7 +1983,7 @@ class Class90_1 { runTest // trigger } - def run { value89_2 } + def run: Unit = { value89_2 } } @@ -1994,7 +1994,7 @@ trait Trait92_1 { object Obj { ObjCounter += 1} - def multiThreadedAccess() { + def multiThreadedAccess(): Unit = { val threads = for (i <- 1 to 5) yield new Thread(new Runnable { def run = Obj }) @@ -2003,7 +2003,7 @@ trait Trait92_1 { threads foreach (_.join()) } - def runTest { + def runTest: Unit = { try { multiThreadedAccess() assert(ObjCounter == 1, "multiple instances: " + ObjCounter) @@ -2016,12 +2016,12 @@ trait Trait92_1 { runTest // trigger } - def run { value89_2 } + def run: Unit = { value89_2 } } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { (new Class2_1).run Object3_1.run (new Trait4_1 {}).run diff --git a/tests/pending/run/interop_manifests_are_abstypetags.scala b/tests/pending/run/interop_manifests_are_abstypetags.scala index f2c272310..e864aec10 100644 --- a/tests/pending/run/interop_manifests_are_abstypetags.scala +++ b/tests/pending/run/interop_manifests_are_abstypetags.scala @@ -8,4 +8,4 @@ object Test extends App { manifestIsWeakTypeTag[Int] manifestIsWeakTypeTag[String] manifestIsWeakTypeTag[Array[Int]] -}
\ No newline at end of file +} diff --git a/tests/pending/run/interop_manifests_are_typetags.scala b/tests/pending/run/interop_manifests_are_typetags.scala index 294d3c22d..a228e7017 100644 --- a/tests/pending/run/interop_manifests_are_typetags.scala +++ b/tests/pending/run/interop_manifests_are_typetags.scala @@ -8,4 +8,4 @@ object Test extends App { manifestIsTypeTag[Int] manifestIsTypeTag[String] manifestIsTypeTag[Array[Int]] -}
\ No newline at end of file +} diff --git a/tests/pending/run/interop_typetags_are_manifests.scala b/tests/pending/run/interop_typetags_are_manifests.scala index 6dc543781..071c3ff25 100644 --- a/tests/pending/run/interop_typetags_are_manifests.scala +++ b/tests/pending/run/interop_typetags_are_manifests.scala @@ -10,4 +10,4 @@ object Test extends App { typeTagIsManifest[Int] typeTagIsManifest[String] typeTagIsManifest[Array[Int]] -}
\ No newline at end of file +} diff --git a/tests/pending/run/iq.scala b/tests/pending/run/iq.scala index 1eb1d40e3..e70b6e4f8 100644 --- a/tests/pending/run/iq.scala +++ b/tests/pending/run/iq.scala @@ -5,7 +5,7 @@ import scala.collection.immutable.Queue object iq { - def main { + def main: Unit = { /* Create an empty queue. */ val q: Queue[Int] = Queue.empty @@ -105,7 +105,7 @@ object iq { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { iq.main } } diff --git a/tests/pending/run/is-valid-num.scala b/tests/pending/run/is-valid-num.scala index 4ab2fac8d..5a4a0503d 100644 --- a/tests/pending/run/is-valid-num.scala +++ b/tests/pending/run/is-valid-num.scala @@ -49,9 +49,9 @@ object Test { testNaNs() } - def testBigInts() { + def testBigInts(): Unit = { def biExp2(e: Int) = BigInt(1) << e - def checkBigInt2(bi: BigInt) { checkBigInt(-bi); checkBigInt(bi) } + def checkBigInt2(bi: BigInt): Unit = { checkBigInt(-bi); checkBigInt(bi) } val pf = 24 val pd = 53 @@ -136,7 +136,7 @@ object Test { checkBigInt2(biExp2(1024)) } - def testNonWholeDoubles() { + def testNonWholeDoubles(): Unit = { checkNonWholeDouble(0.5) checkNonWholeDouble(-math.E) checkNonWholeDouble((1L << 51).toDouble + 0.5) @@ -145,7 +145,7 @@ object Test { checkNonWholeDouble(Double.NegativeInfinity) } - def testNaNs() { + def testNaNs(): Unit = { assert(!Double.NaN.isWhole, Double.NaN) // assert(!Double.NaN.isValidDouble, Double.NaN) // assert(!Double.NaN.isValidFloat, Double.NaN) @@ -165,7 +165,7 @@ object Test { assert(!Float.NaN.isValidByte, Float.NaN) } - def checkNonWholeDouble(d: Double) { + def checkNonWholeDouble(d: Double): Unit = { val f = d.toFloat val isFloat = f == d @@ -202,7 +202,7 @@ object Test { } } - def checkBigInt(bi: BigInt) { + def checkBigInt(bi: BigInt): Unit = { val bd = BigDecimal(bi, java.math.MathContext.UNLIMITED) val isByte = bi >= Byte.MinValue && bi <= Byte.MaxValue val isShort = bi >= Short.MinValue && bi <= Short.MaxValue diff --git a/tests/pending/run/iterator-from.scala b/tests/pending/run/iterator-from.scala index e2ca5864e..9307043d8 100644 --- a/tests/pending/run/iterator-from.scala +++ b/tests/pending/run/iterator-from.scala @@ -11,7 +11,7 @@ object Test extends App { val maxKey = 50 val maxValue = 50 - def testSet[A <% Ordered[A]](set: SortedSet[A], list: List[A]) { + def testSet[A <% Ordered[A]](set: SortedSet[A], list: List[A]): Unit = { val distinctSorted = list.distinct.sorted assertEquals("Set size wasn't the same as list sze", set.size, distinctSorted.size) @@ -24,7 +24,7 @@ object Test extends App { } } - def testMap[A <% Ordered[A], B](map: SortedMap[A, B], list: List[(A, B)]) { + def testMap[A <% Ordered[A], B](map: SortedMap[A, B], list: List[(A, B)]): Unit = { val distinctSorted = distinctByKey(list).sortBy(_._1) assertEquals("Map size wasn't the same as list sze", map.size, distinctSorted.size) @@ -39,11 +39,11 @@ object Test extends App { } } - def check[A](clazz: Class[_], list: List[_], m1: String, m2: String, l1: List[A], l2: List[A]) { + def check[A](clazz: Class[_], list: List[_], m1: String, m2: String, l1: List[A], l2: List[A]): Unit = { assertEquals(s"$clazz: `$m1` didn't match `$m2` on list $list", l1, l2) } - def assertEquals[A](msg: String, x: A, y: A) { + def assertEquals[A](msg: String, x: A, y: A): Unit = { assert(x == y, s"$msg\n1: $x\n2: $y") } diff --git a/tests/pending/run/iterator3444.scala b/tests/pending/run/iterator3444.scala index 1d0713add..0a8f94291 100644 --- a/tests/pending/run/iterator3444.scala +++ b/tests/pending/run/iterator3444.scala @@ -3,7 +3,7 @@ // ticked #3444 object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val it = (1 to 12).toSeq.iterator assert(it.next == 1) diff --git a/tests/pending/run/iterators.scala b/tests/pending/run/iterators.scala index 57e05d347..e2a97ec7a 100644 --- a/tests/pending/run/iterators.scala +++ b/tests/pending/run/iterators.scala @@ -100,7 +100,7 @@ object Test { "" + i + "x" + j } - def check_success[A](name: String, closure: => A, expected: A) { + def check_success[A](name: String, closure: => A, expected: A): Unit = { print("test " + name) try { val actual: A = closure @@ -116,7 +116,7 @@ object Test { println() } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { check_success("check_from", check_from, -1) check_success("check_range", check_range, 11) check_success("check_range2", check_range2, 26) diff --git a/tests/pending/run/kmpSliceSearch.scala b/tests/pending/run/kmpSliceSearch.scala index e72f78bfe..4d582bb1c 100644 --- a/tests/pending/run/kmpSliceSearch.scala +++ b/tests/pending/run/kmpSliceSearch.scala @@ -10,7 +10,7 @@ object Test { if (i<0) i else xs.length - ys.length - i } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val rng = new scala.util.Random(java.lang.Integer.parseInt("kmp",36)) // Make sure we agree with naive implementation diff --git a/tests/pending/run/lazy-concurrent.scala b/tests/pending/run/lazy-concurrent.scala index 4699ed6a1..9acfa7753 100644 --- a/tests/pending/run/lazy-concurrent.scala +++ b/tests/pending/run/lazy-concurrent.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { class Singleton { val field = () println("Initializing singleton.") diff --git a/tests/pending/run/lazy-exprs.scala b/tests/pending/run/lazy-exprs.scala index 204c4b564..c1800f2c6 100644 --- a/tests/pending/run/lazy-exprs.scala +++ b/tests/pending/run/lazy-exprs.scala @@ -1,6 +1,6 @@ object TestExpressions { - def patmatchScrut { + def patmatchScrut: Unit = { lazy val z1: Option[String] = { println("forced <z1>"); Some("lazy z1") } val res = z1 match { @@ -14,7 +14,7 @@ object TestExpressions { println("failed") } - def patmatchCase { + def patmatchCase: Unit = { val t: Option[String] = Some("test") val res = t match { case Some(msg) => @@ -31,7 +31,7 @@ object TestExpressions { } - def patmatchPat { + def patmatchPat: Unit = { lazy val Z1 = { println("forced <z1>"); "lazy Z1" } print("lazy val in case: ") val t: Option[String] = Some("lazy Z1") @@ -44,7 +44,7 @@ object TestExpressions { } } - def ifcond { + def ifcond: Unit = { lazy val z1 = { println("forced <z1>"); "lazy z1" } print("lazy val in if condition: ") if (z1 == "lazy z1") @@ -56,7 +56,7 @@ object TestExpressions { lazy val LazyField = { println("forced LazyField"); "LazyField" } - def testPatMatchField { + def testPatMatchField: Unit = { print("lazy val in pattern: ") val t: Option[String] = Some("LazyField") t match { @@ -69,7 +69,7 @@ object TestExpressions { } lazy val (x, y) = ({print("x"); "x"}, {print("y"); "y"}) - def testPatLazyVal { + def testPatLazyVal: Unit = { println("lazy val with patterns:") print("x and y: ") println("(" + x + ", " + y + ")") @@ -78,7 +78,7 @@ object TestExpressions { println("(" + x1 + ", " + y1 + ")") } - def test { + def test: Unit = { patmatchScrut patmatchCase patmatchPat diff --git a/tests/pending/run/lazy-locals.scala b/tests/pending/run/lazy-locals.scala index b28b28e35..e21a94e72 100644 --- a/tests/pending/run/lazy-locals.scala +++ b/tests/pending/run/lazy-locals.scala @@ -130,7 +130,7 @@ object Test extends App { t } - def testRecVal { + def testRecVal: Unit = { lazy val twos: List[Int] = 2 :: twos lazy val ones: Stream[Int] = Stream.cons(1, ones) @@ -138,7 +138,7 @@ object Test extends App { } // should compile without error - def testMutualRecVal { + def testMutualRecVal: Unit = { lazy val odd: Int = 1 + even lazy val even: Int = 1 + odd diff --git a/tests/pending/run/lazy-traits.scala b/tests/pending/run/lazy-traits.scala index 38207672d..c7b6790db 100644 --- a/tests/pending/run/lazy-traits.scala +++ b/tests/pending/run/lazy-traits.scala @@ -155,7 +155,7 @@ class MixedUnitLazy extends UnitLazy with UnitLazyT { object Test extends App { - def test(name: String, v: A) { + def test(name: String, v: A): Unit = { println(name + " test:") println(v) println(v) diff --git a/tests/pending/run/list_map.scala b/tests/pending/run/list_map.scala index fba3aae22..59acf09c6 100755 --- a/tests/pending/run/list_map.scala +++ b/tests/pending/run/list_map.scala @@ -1,7 +1,7 @@ import collection.immutable.ListMap object Test { - def testImmutableMinus() { + def testImmutableMinus(): Unit = { val empty = ListMap.empty[Int, Int] val m0 = ListMap(1 -> 1, 2 -> 2) @@ -20,7 +20,7 @@ object Test { assert ((empty - 1) eq empty) } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { testImmutableMinus() } } diff --git a/tests/pending/run/lists-run.scala b/tests/pending/run/lists-run.scala index 05767b900..713b19659 100644 --- a/tests/pending/run/lists-run.scala +++ b/tests/pending/run/lists-run.scala @@ -5,7 +5,7 @@ import scala.language.postfixOps object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { Test_multiset.run() // multiset operations: union, intersect, diff Test1.run() //count, exists, filter, .. Test2.run() //#468 @@ -16,7 +16,7 @@ object Test { } object Test_multiset { - def run() { + def run(): Unit = { def isSubListOf[A](thiz: List[A], that: List[A]): Boolean = thiz forall (that contains _) val xs = List(1, 1, 2) @@ -80,7 +80,7 @@ min cardinality(ys, e))) } object Test1 { - def run() { + def run(): Unit = { val xs1 = List(1, 2, 3) val xs2 = List('a', 'b') val xs3 = List(List(1, 2), List(4, 5)) @@ -132,7 +132,7 @@ object Test1 { } object Test2 { - def run() { + def run(): Unit = { val xs1 = List(1, 2, 3) val xs2 = List(0) @@ -150,7 +150,7 @@ object Test2 { } object Test3 { - def run() { + def run(): Unit = { try { List.range(1, 10, 0) } catch { @@ -162,7 +162,7 @@ object Test3 { } object Test4 { - def run() { + def run(): Unit = { assert(List(1,2,3).endsWith(List(2,3))) assert(!List(1,2,3).endsWith(List(1,3))) assert(List(1,2,3).endsWith(List())) @@ -179,7 +179,7 @@ object Test5 { case List(x) => x.toString case Nil => "Nil" } - def run() { + def run(): Unit = { assert(show(List()) == "Nil") assert(show(List("a")) == "a") assert(show(List("foo", "b")) == "List(b)") diff --git a/tests/pending/run/literals.scala b/tests/pending/run/literals.scala index 5f23e6b49..705de7726 100644 --- a/tests/pending/run/literals.scala +++ b/tests/pending/run/literals.scala @@ -14,7 +14,7 @@ object Test { def \u03b1\u03b1(that: GGG) = i + that.i } - def check_success[a](name: String, closure: => a, expected: a) { + def check_success[a](name: String, closure: => a, expected: a): Unit = { print("test " + name) try { val actual: a = closure @@ -31,7 +31,7 @@ object Test { println } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { // char check_success("'\\u0024' == '$'", '\u0024', '$') check_success("'\\u005f' == '_'", '\u005f', '_') diff --git a/tests/pending/run/macro-expand-implicit-macro-is-view/Impls_1.scala b/tests/pending/run/macro-expand-implicit-macro-is-view/Impls_1.scala index aeceee5a5..d72db872e 100644 --- a/tests/pending/run/macro-expand-implicit-macro-is-view/Impls_1.scala +++ b/tests/pending/run/macro-expand-implicit-macro-is-view/Impls_1.scala @@ -6,4 +6,4 @@ object Impls { val body = Apply(Ident(definitions.SomeModule), List(Select(x.tree, TermName("toInt")))) c.Expr[Option[Int]](body) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/macro-reflective-mamd-normal-mi/Impls_1.scala b/tests/pending/run/macro-reflective-mamd-normal-mi/Impls_1.scala index 89a818d99..e62db783b 100644 --- a/tests/pending/run/macro-reflective-mamd-normal-mi/Impls_1.scala +++ b/tests/pending/run/macro-reflective-mamd-normal-mi/Impls_1.scala @@ -6,4 +6,4 @@ object Impls { val body = Apply(Select(x.tree, TermName("$plus")), List(Literal(Constant(1)))) c.Expr[Int](body) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/macro-reify-abstypetag-notypeparams/Test.scala b/tests/pending/run/macro-reify-abstypetag-notypeparams/Test.scala index 73c2d0592..c51f1a10c 100644 --- a/tests/pending/run/macro-reify-abstypetag-notypeparams/Test.scala +++ b/tests/pending/run/macro-reify-abstypetag-notypeparams/Test.scala @@ -3,4 +3,4 @@ import scala.reflect.runtime.universe._ object Test extends App { println(implicitly[WeakTypeTag[Int]]) println(implicitly[WeakTypeTag[List[Int]]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/macro-reify-abstypetag-typeparams-notags/Test.scala b/tests/pending/run/macro-reify-abstypetag-typeparams-notags/Test.scala index 4ba2231d9..19070eec8 100644 --- a/tests/pending/run/macro-reify-abstypetag-typeparams-notags/Test.scala +++ b/tests/pending/run/macro-reify-abstypetag-typeparams-notags/Test.scala @@ -6,4 +6,4 @@ object Test extends App { println(implicitly[WeakTypeTag[List[T]]]) } fooNoTypeTag[Int] -}
\ No newline at end of file +} diff --git a/tests/pending/run/macro-reify-abstypetag-typeparams-tags/Test.scala b/tests/pending/run/macro-reify-abstypetag-typeparams-tags/Test.scala index 70ca615e1..c32dff18a 100644 --- a/tests/pending/run/macro-reify-abstypetag-typeparams-tags/Test.scala +++ b/tests/pending/run/macro-reify-abstypetag-typeparams-tags/Test.scala @@ -6,4 +6,4 @@ object Test extends App { println(implicitly[WeakTypeTag[List[T]]]) } fooTypeTag[Int] -}
\ No newline at end of file +} diff --git a/tests/pending/run/macro-reify-abstypetag-usetypetag/Test.scala b/tests/pending/run/macro-reify-abstypetag-usetypetag/Test.scala index ecae4110a..af5b924f5 100644 --- a/tests/pending/run/macro-reify-abstypetag-usetypetag/Test.scala +++ b/tests/pending/run/macro-reify-abstypetag-usetypetag/Test.scala @@ -6,4 +6,4 @@ object Test extends App { println(implicitly[WeakTypeTag[List[T]]]) } fooTypeTag[Int] -}
\ No newline at end of file +} diff --git a/tests/pending/run/macro-reify-typetag-notypeparams/Test.scala b/tests/pending/run/macro-reify-typetag-notypeparams/Test.scala index be9feac4c..29732ceb7 100644 --- a/tests/pending/run/macro-reify-typetag-notypeparams/Test.scala +++ b/tests/pending/run/macro-reify-typetag-notypeparams/Test.scala @@ -3,4 +3,4 @@ import scala.reflect.runtime.universe._ object Test extends App { println(implicitly[TypeTag[Int]]) println(implicitly[TypeTag[List[Int]]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/macro-reify-typetag-typeparams-tags/Test.scala b/tests/pending/run/macro-reify-typetag-typeparams-tags/Test.scala index be0ce33e4..ec68f9d10 100644 --- a/tests/pending/run/macro-reify-typetag-typeparams-tags/Test.scala +++ b/tests/pending/run/macro-reify-typetag-typeparams-tags/Test.scala @@ -6,4 +6,4 @@ object Test extends App { println(implicitly[TypeTag[List[T]]]) } fooTypeTag[Int] -}
\ No newline at end of file +} diff --git a/tests/pending/run/macro-undetparams-implicitval/Test.scala b/tests/pending/run/macro-undetparams-implicitval/Test.scala index 72fd2f3d7..c584e45b2 100644 --- a/tests/pending/run/macro-undetparams-implicitval/Test.scala +++ b/tests/pending/run/macro-undetparams-implicitval/Test.scala @@ -3,4 +3,4 @@ import scala.reflect.runtime.universe._ object Test extends App { def foo[T: TypeTag] = println(implicitly[TypeTag[T]]) foo -}
\ No newline at end of file +} diff --git a/tests/pending/run/macro-whitebox-dynamic-materialization/Macros_1.scala b/tests/pending/run/macro-whitebox-dynamic-materialization/Macros_1.scala index a2e925bb3..aaf27c289 100644 --- a/tests/pending/run/macro-whitebox-dynamic-materialization/Macros_1.scala +++ b/tests/pending/run/macro-whitebox-dynamic-materialization/Macros_1.scala @@ -22,4 +22,4 @@ object Macros { c.abort(c.enclosingPosition, "I don't like classes that contain integers") q"new Foo[$tpe]{ override def toString = ${tpe.toString} }" } -}
\ No newline at end of file +} diff --git a/tests/pending/run/macro-whitebox-dynamic-materialization/Test_2.scala b/tests/pending/run/macro-whitebox-dynamic-materialization/Test_2.scala index bf19209ab..abb5229bd 100644 --- a/tests/pending/run/macro-whitebox-dynamic-materialization/Test_2.scala +++ b/tests/pending/run/macro-whitebox-dynamic-materialization/Test_2.scala @@ -1,4 +1,4 @@ object Test extends App { println(implicitly[Foo[C1]]) println(implicitly[Foo[C2]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/manifests-undeprecated-in-2.10.0.scala b/tests/pending/run/manifests-undeprecated-in-2.10.0.scala index 82e90b3a8..2a7321db9 100644 --- a/tests/pending/run/manifests-undeprecated-in-2.10.0.scala +++ b/tests/pending/run/manifests-undeprecated-in-2.10.0.scala @@ -12,4 +12,4 @@ object Test extends App { val m4b = implicitly[Manifest[Int]] val m5b = implicitly[OptManifest[Int]] -}
\ No newline at end of file +} diff --git a/tests/pending/run/mapConserve.scala b/tests/pending/run/mapConserve.scala index f52af3b9f..4c842b0a5 100644 --- a/tests/pending/run/mapConserve.scala +++ b/tests/pending/run/mapConserve.scala @@ -17,7 +17,7 @@ object Test { assert(xs.mapConserve(x => x) eq xs) } - def checkBehaviourUnchanged(input: List[_], oldOutput: List[_], newOutput: List[_]) { + def checkBehaviourUnchanged(input: List[_], oldOutput: List[_], newOutput: List[_]): Unit = { if (oldOutput eq input) assert(newOutput eq oldOutput) else { @@ -30,7 +30,7 @@ object Test { var callCount = 0 val lastHexDigit: Function1[BigInt, AnyRef] = { x: BigInt => callCount+=1; if (x < 16) x else x % 16 } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { for (length <- 0 to maxListLength; bitmap <- 0 until (1 << length); data = List.range(0, length) map { x: Int => diff --git a/tests/pending/run/map_java_conversions.scala b/tests/pending/run/map_java_conversions.scala index c007b3e0e..b7b39128c 100644 --- a/tests/pending/run/map_java_conversions.scala +++ b/tests/pending/run/map_java_conversions.scala @@ -5,7 +5,7 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { import collection.JavaConversions._ test(new java.util.HashMap[String, String]) @@ -13,7 +13,7 @@ object Test { testConcMap } - def testConcMap { + def testConcMap: Unit = { import collection.JavaConversions._ val concMap = new java.util.concurrent.ConcurrentHashMap[String, String] @@ -27,7 +27,7 @@ object Test { assert(cmap.replace("absentKey", "newAbsentValue", ".......") == true) } - def test(m: collection.mutable.Map[String, String]) { + def test(m: collection.mutable.Map[String, String]): Unit = { m.clear assert(m.size == 0) diff --git a/tests/pending/run/map_test.scala b/tests/pending/run/map_test.scala index b76dfb457..b7036f51d 100644 --- a/tests/pending/run/map_test.scala +++ b/tests/pending/run/map_test.scala @@ -5,17 +5,17 @@ object Test extends App { test2() println("OK") - def test1() { + def test1(): Unit = { val myMap: TreeMap[Int, String] = new TreeMap test_map(myMap) } - def test2() { + def test2(): Unit = { val myMap: ListMap[Int, String] = new ListMap test_map(myMap) } - def test_map(myMap: Map[Int, String]) { + def test_map(myMap: Map[Int, String]): Unit = { val map1 = myMap.updated(42,"The answer") val map2 = map1.updated(17,"A small random number") val map3 = map2.updated(666,"A bigger random number") diff --git a/tests/pending/run/matcharraytail.scala b/tests/pending/run/matcharraytail.scala index 24a8dd12b..e82bcf6f0 100644 --- a/tests/pending/run/matcharraytail.scala +++ b/tests/pending/run/matcharraytail.scala @@ -1,6 +1,6 @@ object Test extends App{ Array("foo", "bar", "baz") match { - case x@Array("foo", bar @_*) => println(x.deep.toString); println(bar.toString); + case x@Array("foo", bar :_*) => println(x.deep.toString); println(bar.toString); case Array(x, y, z) => println("shouldn't have fallen through"); case _ => println("default case?!"); } diff --git a/tests/pending/run/matchonstream.scala b/tests/pending/run/matchonstream.scala index c9bfefc21..0ccc7bc47 100644 --- a/tests/pending/run/matchonstream.scala +++ b/tests/pending/run/matchonstream.scala @@ -1,3 +1,3 @@ object Test extends App{ - Stream.from(1) match { case Stream(1, 2, x @_*) => println("It worked!") } + Stream.from(1) match { case Stream(1, 2, x :_*) => println("It worked!") } } diff --git a/tests/pending/run/misc.scala b/tests/pending/run/misc.scala index 2ae76bd96..72af135b9 100644 --- a/tests/pending/run/misc.scala +++ b/tests/pending/run/misc.scala @@ -227,7 +227,7 @@ Console.println; //############################################################################ - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { } //############################################################################ diff --git a/tests/pending/run/mixin-signatures.scala b/tests/pending/run/mixin-signatures.scala index afd3fad87..d939be62c 100644 --- a/tests/pending/run/mixin-signatures.scala +++ b/tests/pending/run/mixin-signatures.scala @@ -83,7 +83,7 @@ object Test { // scala.tools.nsc.symtab.Flags.flagsToString(flags) } - def show(clazz: Class[_]) { + def show(clazz: Class[_]): Unit = { print(clazz + " {") clazz.getMethods.sortBy(x => (x.getName, x.isBridge, x.toString)) filter (_.getName.length == 1) foreach { m => print("\n " + m + flagsString(m)) @@ -94,12 +94,12 @@ object Test { println("\n}") println("") } - def show(x: AnyRef) { show(x.getClass) } - def show(x: String) { show(Class.forName(x)) } + def show(x: AnyRef): Unit = { show(x.getClass) } + def show(x: String): Unit = { show(Class.forName(x)) } def main(args: Array[String]): Unit = { List(bar1, bar2, bar3, bar4, bar5) foreach show List("Foo1$class", "Foo2$class") foreach show println(go) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/mutable-treeset.scala b/tests/pending/run/mutable-treeset.scala index 100ab3996..28b233836 100644 --- a/tests/pending/run/mutable-treeset.scala +++ b/tests/pending/run/mutable-treeset.scala @@ -22,8 +22,8 @@ object Test extends App { val subsubnonlist = almostmin :: almostmax :: subnonlist val subsubsorted = distinctSubsublist.sorted - def testSize { - def check(set : TreeSet[Int], list: List[Int]) { + def testSize: Unit = { + def check(set : TreeSet[Int], list: List[Int]): Unit = { assert(set.size == list.size, s"$set had size ${set.size} while $list had size ${list.size}") } @@ -41,8 +41,8 @@ object Test extends App { check(subsubset.clone, distinctSubsublist) } - def testContains { - def check(set : TreeSet[Int], list: List[Int], nonlist: List[Int]) { + def testContains: Unit = { + def check(set : TreeSet[Int], list: List[Int], nonlist: List[Int]): Unit = { assert(list forall set.apply, s"$set did not contain all elements of $list using apply") assert(list forall set.contains, s"$set did not contain all elements of $list using contains") assert(!(nonlist exists set.apply), s"$set had an element from $nonlist using apply") @@ -62,8 +62,8 @@ object Test extends App { check(subsubset.clone, subsublist, subsubnonlist) } - def testAdd { - def check(set : TreeSet[Int], list: List[Int], nonlist: List[Int]) { + def testAdd: Unit = { + def check(set : TreeSet[Int], list: List[Int], nonlist: List[Int]): Unit = { var builtList = List[Int]() for (x <- list) { set += x @@ -92,8 +92,8 @@ object Test extends App { check(subsubclone, list, subsubnonlist) } - def testRemove { - def check(set: TreeSet[Int], sorted: List[Int]) { + def testRemove: Unit = { + def check(set: TreeSet[Int], sorted: List[Int]): Unit = { var builtList = sorted for (x <- list) { set remove x @@ -119,8 +119,8 @@ object Test extends App { check(subsubclone, subsubsorted) } - def testIterator { - def check(set: TreeSet[Int], list: List[Int]) { + def testIterator: Unit = { + def check(set: TreeSet[Int], list: List[Int]): Unit = { val it = set.iterator.toList assert(it == list, s"$it did not equal $list") } diff --git a/tests/pending/run/names-defaults.scala b/tests/pending/run/names-defaults.scala index b7ed490cb..20acc0292 100644 --- a/tests/pending/run/names-defaults.scala +++ b/tests/pending/run/names-defaults.scala @@ -24,7 +24,7 @@ object Test extends App { // anonymous functions { - def doMod(f: Int => Unit) { f(20) } + def doMod(f: Int => Unit): Unit = { f(20) } var var1 = 0 doMod(var1 = _) println(var1) @@ -224,14 +224,14 @@ object Test extends App { // implicits + defaults { - implicit val implInt = 10101 + implicit val implInt: Int = 10101 println(test8()) } println(test9) { - implicit val implString = "blublu" + implicit val implString: String = "blublu" println(test9) } @@ -265,7 +265,7 @@ object Test extends App { // #2290 def spawn(a: Int, b: => Unit) = { () } - def t { + def t: Unit = { spawn(b = { val ttt = 1; ttt }, a = 0) } @@ -276,8 +276,8 @@ object Test extends App { case class A2390[T](x: Int) { def copy(a: Int)(b: Int = 0) = 0 } // #2489 - class A2489 { def foo { def bar(a: Int = 1) = a; bar(); val u = 0 } } - class A2489x2 { def foo { val v = 10; def bar(a: Int = 1, b: Int = 2) = a; bar(); val u = 0 } } + class A2489 { def foo: Unit = { def bar(a: Int = 1) = a; bar(); val u = 0 } } + class A2489x2 { def foo: Unit = { val v = 10; def bar(a: Int = 1, b: Int = 2) = a; bar(); val u = 0 } } // a bug reported on the mailing lists, related to #2489 class Test2489 { @@ -480,13 +480,13 @@ class A2 { // using names / defaults in self constructor call. // overloading resolution: calling A3("string") picks the second, method with default is always less specific. class A3(x: String, y: Int = 10) { - def this(a: Object) { + def this(a: Object) = { this(y = 10, x = a.toString()) println(x) } } class A4(x: String, y: Int = 11) { - def this(b: Double, sep: String) { + def this(b: Double, sep: String) = { this(sep + b + sep) println(y) } diff --git a/tests/pending/run/newTags.scala b/tests/pending/run/newTags.scala index c5199d4e5..43c01256e 100644 --- a/tests/pending/run/newTags.scala +++ b/tests/pending/run/newTags.scala @@ -8,4 +8,4 @@ object Test extends App { println(implicitly[ApiUniverse#TypeTag[T]]) } foo[Map[String, String]] -}
\ No newline at end of file +} diff --git a/tests/pending/run/no-pickle-skolems/Test_2.scala b/tests/pending/run/no-pickle-skolems/Test_2.scala index da55ad9df..c2eefdc0c 100644 --- a/tests/pending/run/no-pickle-skolems/Test_2.scala +++ b/tests/pending/run/no-pickle-skolems/Test_2.scala @@ -12,13 +12,13 @@ object Test { var seen: Set[Symbol] = Set() def id(s: Symbol): Int = s.asInstanceOf[{ def id: Int }].id - def check(s: Symbol) { + def check(s: Symbol): Unit = { if (!seen(s)) { seen += s if (s.name.toString == name) buf ::= s } } - def loop(t: Type) { + def loop(t: Type): Unit = { t match { case TypeRef(pre, sym, args) => loop(pre) ; check(sym) ; args foreach loop case PolyType(tparams, restpe) => tparams foreach { tp => check(tp) ; check(tp.owner) ; loop(tp.info) } ; loop(restpe) diff --git a/tests/pending/run/nonlocalreturn.scala b/tests/pending/run/nonlocalreturn.scala index 3c1e7420e..13b9045da 100644 --- a/tests/pending/run/nonlocalreturn.scala +++ b/tests/pending/run/nonlocalreturn.scala @@ -5,7 +5,7 @@ object Test { wrap({ return Some(1) ; None }) } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println(f()) } } diff --git a/tests/pending/run/numeric-range.scala b/tests/pending/run/numeric-range.scala index 4645db6ef..9cf8e605e 100644 --- a/tests/pending/run/numeric-range.scala +++ b/tests/pending/run/numeric-range.scala @@ -3,7 +3,7 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val r = 'a' to 'z' for (i <- -2 to (r.length + 2)) { assert(r.take(i) == r.toList.take(i), (i, r.take(i))) diff --git a/tests/pending/run/outertest.scala b/tests/pending/run/outertest.scala index fa0443f66..f1030da23 100644 --- a/tests/pending/run/outertest.scala +++ b/tests/pending/run/outertest.scala @@ -36,14 +36,19 @@ class C extends A { object Test extends App { val b = new B val c0 = new C - val c = new { override val c = c0 } with C + val c = new C { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +override val c = c0 +// END copied early initializers +} assert((new b.J).bar eq b) assert((new b.K).bar eq b) assert((new b.L).bar eq b) assert((new c.M).bar eq c) - def checkOuterFields[C: ClassTag](expected: Int) { + def checkOuterFields[C: ClassTag](expected: Int): Unit = { val cls = implicitly[ClassTag[C]].runtimeClass val outerFields = cls.getDeclaredFields().filter(_.getName.contains("$outer")) assert(outerFields.size == expected, outerFields.map(_.getName)) diff --git a/tests/pending/run/parmap-ops.scala b/tests/pending/run/parmap-ops.scala index 4274460c9..3c0d8ee4b 100644 --- a/tests/pending/run/parmap-ops.scala +++ b/tests/pending/run/parmap-ops.scala @@ -2,7 +2,7 @@ import collection._ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val gm: GenMap[Int, Int] = GenMap(0 -> 0, 1 -> 1).par // ops diff --git a/tests/pending/run/partialfun.scala b/tests/pending/run/partialfun.scala index 71c7d3e61..68f8c8c92 100644 --- a/tests/pending/run/partialfun.scala +++ b/tests/pending/run/partialfun.scala @@ -40,7 +40,7 @@ object Test { case Ex2(result) => result } - def collectTest() { + def collectTest(): Unit = { val xs = 1 to 100 resetCnt() @@ -61,17 +61,17 @@ object Test { println(cntRW) } - def orElseTest() { + def orElseTest(): Unit = { val pf0 = new PartialFunction[Unit, Unit] { - def apply(u: Unit) { println("0:apply") } + def apply(u: Unit): Unit = { println("0:apply") } def isDefinedAt(u: Unit) = { println("0:isDefinedAt"); false } } val pf1 = new PartialFunction[Unit, Unit] { - def apply(u: Unit) { println("1:apply") } + def apply(u: Unit): Unit = { println("1:apply") } def isDefinedAt(u: Unit) = { println("1:isDefinedAt"); false } } val pf2 = new PartialFunction[Unit, Unit] { - def apply(u: Unit) { println("2:apply") } + def apply(u: Unit): Unit = { println("2:apply") } def isDefinedAt(u: Unit) = { println("2:isDefinedAt"); true } } diff --git a/tests/pending/run/patmat-behavior-2.scala b/tests/pending/run/patmat-behavior-2.scala index b31f77377..448dcf450 100644 --- a/tests/pending/run/patmat-behavior-2.scala +++ b/tests/pending/run/patmat-behavior-2.scala @@ -17,15 +17,15 @@ object Test { case _ => false } def f1seq(x: Any) = x match { - case Foo(x, ys @ _*) => true + case Foo(x, ys : _*) => true case _ => false } def f2seq(x: Any) = x match { - case Foo(x, y, zs @ _*) => true + case Foo(x, y, zs : _*) => true case _ => false } def f3seq(x: Any) = x match { - case Foo(x, y, z, qs @ _*) => true + case Foo(x, y, z, qs : _*) => true case _ => false } diff --git a/tests/pending/run/patmat-behavior.scala b/tests/pending/run/patmat-behavior.scala index 8b6370d79..3ce9fb3a7 100644 --- a/tests/pending/run/patmat-behavior.scala +++ b/tests/pending/run/patmat-behavior.scala @@ -40,51 +40,51 @@ package pos { def ga5(x: Any) = x match { case C00() => 1 ; case C10(x) => 2 ; case C20(x, y) => 3 ; case C01(xs) => 4 ; case C11(x, ys) => 5 ; case C21(x, y, zs) => 6 } def ga6(x: Any) = x match { case C00() => 1 ; case C10(x) => 2 ; case C20(x, y) => 3 ; case C01(xs) => 4 ; case C11(x, ys) => 5 ; case C21(x, y, zs) => 6 } - def gb1[A](x: C[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs @ _*) => xs.head ; case E11(x, ys @ _*) => x ; case E21(x, y, zs @ _*) => x } - def gb2[A](x: C[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs @ _*) => xs.head ; case E11(x, ys @ _*) => x ; case E21(x, y, zs @ _*) => x } - def gb3[A](x: C[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs @ _*) => xs.head ; case E11(x, ys @ _*) => x ; case E21(x, y, zs @ _*) => x } - def gb4[A](x: C[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs @ _*) => xs.head ; case E11(x, ys @ _*) => x ; case E21(x, y, zs @ _*) => x } - def gb5[A](x: C[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs @ _*) => xs.head ; case E11(x, ys @ _*) => x ; case E21(x, y, zs @ _*) => x } - def gb6[A](x: C[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs @ _*) => xs.head ; case E11(x, ys @ _*) => x ; case E21(x, y, zs @ _*) => x } + def gb1[A](x: C[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs : _*) => xs.head ; case E11(x, ys : _*) => x ; case E21(x, y, zs : _*) => x } + def gb2[A](x: C[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs : _*) => xs.head ; case E11(x, ys : _*) => x ; case E21(x, y, zs : _*) => x } + def gb3[A](x: C[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs : _*) => xs.head ; case E11(x, ys : _*) => x ; case E21(x, y, zs : _*) => x } + def gb4[A](x: C[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs : _*) => xs.head ; case E11(x, ys : _*) => x ; case E21(x, y, zs : _*) => x } + def gb5[A](x: C[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs : _*) => xs.head ; case E11(x, ys : _*) => x ; case E21(x, y, zs : _*) => x } + def gb6[A](x: C[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs : _*) => xs.head ; case E11(x, ys : _*) => x ; case E21(x, y, zs : _*) => x } - def gc1[A](x: C[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gc2[A](x: C[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gc3[A](x: C[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gc4[A](x: C[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gc5[A](x: C[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gc6[A](x: C[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } + def gc1[A](x: C[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gc2[A](x: C[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gc3[A](x: C[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gc4[A](x: C[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gc5[A](x: C[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gc6[A](x: C[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } - def gd1[A, B <: C[A]](x: B) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gd2[A, B <: C[A]](x: B) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gd3[A, B <: C[A]](x: B) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gd4[A, B <: C[A]](x: B) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gd5[A, B <: C[A]](x: B) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gd6[A, B <: C[A]](x: B) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } + def gd1[A, B <: C[A]](x: B) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gd2[A, B <: C[A]](x: B) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gd3[A, B <: C[A]](x: B) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gd4[A, B <: C[A]](x: B) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gd5[A, B <: C[A]](x: B) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gd6[A, B <: C[A]](x: B) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } } } package neg { object Fail { - def gb1[A](x: C00[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs @ _*) => xs.head ; case E11(x, ys @ _*) => x ; case E21(x, y, zs @ _*) => x } - def gb2[A](x: C10[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs @ _*) => xs.head ; case E11(x, ys @ _*) => x ; case E21(x, y, zs @ _*) => x } - def gb3[A](x: C20[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs @ _*) => xs.head ; case E11(x, ys @ _*) => x ; case E21(x, y, zs @ _*) => x } - def gb4[A](x: C01[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs @ _*) => xs.head ; case E11(x, ys @ _*) => x ; case E21(x, y, zs @ _*) => x } - def gb5[A](x: C11[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs @ _*) => xs.head ; case E11(x, ys @ _*) => x ; case E21(x, y, zs @ _*) => x } - def gb6[A](x: C21[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs @ _*) => xs.head ; case E11(x, ys @ _*) => x ; case E21(x, y, zs @ _*) => x } + def gb1[A](x: C00[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs : _*) => xs.head ; case E11(x, ys : _*) => x ; case E21(x, y, zs : _*) => x } + def gb2[A](x: C10[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs : _*) => xs.head ; case E11(x, ys : _*) => x ; case E21(x, y, zs : _*) => x } + def gb3[A](x: C20[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs : _*) => xs.head ; case E11(x, ys : _*) => x ; case E21(x, y, zs : _*) => x } + def gb4[A](x: C01[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs : _*) => xs.head ; case E11(x, ys : _*) => x ; case E21(x, y, zs : _*) => x } + def gb5[A](x: C11[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs : _*) => xs.head ; case E11(x, ys : _*) => x ; case E21(x, y, zs : _*) => x } + def gb6[A](x: C21[A]) = x match { case E00() => ??? ; case E10(x) => x ; case E20(x, y) => x ; case E01(xs : _*) => xs.head ; case E11(x, ys : _*) => x ; case E21(x, y, zs : _*) => x } - def gc1[A](x: C00[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gc2[A](x: C10[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gc3[A](x: C20[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gc4[A](x: C01[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gc5[A](x: C11[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } - def gc6[A](x: C21[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs @ _*) => xs.head ; case F11(x, ys @ _*) => x ; case F21(x, y, zs @ _*) => x } + def gc1[A](x: C00[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gc2[A](x: C10[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gc3[A](x: C20[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gc4[A](x: C01[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gc5[A](x: C11[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } + def gc6[A](x: C21[A]) = x match { case F00() => ??? ; case F10(x) => x ; case F20(x, y) => x ; case F01(xs : _*) => xs.head ; case F11(x, ys : _*) => x ; case F21(x, y, zs : _*) => x } - def gd1[A](x: C00[A]) = x match { case G00() => ??? ; case G10(x) => x ; case G20(x, y) => x ; case G01(xs @ _*) => xs.head ; case G11(x, ys @ _*) => x ; case G21(x, y, zs @ _*) => x } - def gd2[A](x: C10[A]) = x match { case G00() => ??? ; case G10(x) => x ; case G20(x, y) => x ; case G01(xs @ _*) => xs.head ; case G11(x, ys @ _*) => x ; case G21(x, y, zs @ _*) => x } - def gd3[A](x: C20[A]) = x match { case G00() => ??? ; case G10(x) => x ; case G20(x, y) => x ; case G01(xs @ _*) => xs.head ; case G11(x, ys @ _*) => x ; case G21(x, y, zs @ _*) => x } - def gd4[A](x: C01[A]) = x match { case G00() => ??? ; case G10(x) => x ; case G20(x, y) => x ; case G01(xs @ _*) => xs.head ; case G11(x, ys @ _*) => x ; case G21(x, y, zs @ _*) => x } - def gd5[A](x: C11[A]) = x match { case G00() => ??? ; case G10(x) => x ; case G20(x, y) => x ; case G01(xs @ _*) => xs.head ; case G11(x, ys @ _*) => x ; case G21(x, y, zs @ _*) => x } - def gd6[A](x: C21[A]) = x match { case G00() => ??? ; case G10(x) => x ; case G20(x, y) => x ; case G01(xs @ _*) => xs.head ; case G11(x, ys @ _*) => x ; case G21(x, y, zs @ _*) => x } + def gd1[A](x: C00[A]) = x match { case G00() => ??? ; case G10(x) => x ; case G20(x, y) => x ; case G01(xs : _*) => xs.head ; case G11(x, ys : _*) => x ; case G21(x, y, zs : _*) => x } + def gd2[A](x: C10[A]) = x match { case G00() => ??? ; case G10(x) => x ; case G20(x, y) => x ; case G01(xs : _*) => xs.head ; case G11(x, ys : _*) => x ; case G21(x, y, zs : _*) => x } + def gd3[A](x: C20[A]) = x match { case G00() => ??? ; case G10(x) => x ; case G20(x, y) => x ; case G01(xs : _*) => xs.head ; case G11(x, ys : _*) => x ; case G21(x, y, zs : _*) => x } + def gd4[A](x: C01[A]) = x match { case G00() => ??? ; case G10(x) => x ; case G20(x, y) => x ; case G01(xs : _*) => xs.head ; case G11(x, ys : _*) => x ; case G21(x, y, zs : _*) => x } + def gd5[A](x: C11[A]) = x match { case G00() => ??? ; case G10(x) => x ; case G20(x, y) => x ; case G01(xs : _*) => xs.head ; case G11(x, ys : _*) => x ; case G21(x, y, zs : _*) => x } + def gd6[A](x: C21[A]) = x match { case G00() => ??? ; case G10(x) => x ; case G20(x, y) => x ; case G01(xs : _*) => xs.head ; case G11(x, ys : _*) => x ; case G21(x, y, zs : _*) => x } } } diff --git a/tests/pending/run/patmat-finally.scala b/tests/pending/run/patmat-finally.scala index dfea5ad17..e16945202 100644 --- a/tests/pending/run/patmat-finally.scala +++ b/tests/pending/run/patmat-finally.scala @@ -1,6 +1,6 @@ /** Test pattern matching and finally, see SI-5929. */ object Test extends App { - def bar(s1: Object, s2: Object) { + def bar(s1: Object, s2: Object): Unit = { s1 match { case _ => } diff --git a/tests/pending/run/patmat-mix-case-extractor.scala b/tests/pending/run/patmat-mix-case-extractor.scala index 964e6f743..8c1a2c906 100644 --- a/tests/pending/run/patmat-mix-case-extractor.scala +++ b/tests/pending/run/patmat-mix-case-extractor.scala @@ -15,27 +15,27 @@ object Extractor4 { def unapplySeq(x: ProdCaseClass with SeqCaseClass): Option[( class A { def f1(x: Any) = x match { case CaseClass1() => -1 - case CaseClass2(xs @ _*) => xs.sum + case CaseClass2(xs : _*) => xs.sum case CaseClass3(x) => x - case CaseClass4(x, xs @ _*) => x + xs.sum - case Extractor4(x, xs @ _*) => 1000 + x + xs.sum + case CaseClass4(x, xs : _*) => x + xs.sum + case Extractor4(x, xs : _*) => 1000 + x + xs.sum case Extractor3(x) => 1000 + x - case Extractor2(xs @ _*) => 1000 + xs.sum + case Extractor2(xs : _*) => 1000 + xs.sum case Extractor1() => -3 case _ => -2 } def f2(x: Any) = x match { - case Extractor4(x, xs @ _*) => 1000 + x + xs.sum + case Extractor4(x, xs : _*) => 1000 + x + xs.sum case Extractor3(x) => 1000 + x - case Extractor2(xs @ _*) => 1000 + xs.sum + case Extractor2(xs : _*) => 1000 + xs.sum case Extractor1() => -3 case CaseClass1() => -1 - case CaseClass2(xs @ _*) => xs.sum + case CaseClass2(xs : _*) => xs.sum case CaseClass3(x) => x - case CaseClass4(x, xs @ _*) => x + xs.sum + case CaseClass4(x, xs : _*) => x + xs.sum case _ => -2 } - def run() { + def run(): Unit = { List( f1(CaseClass1()), f1(CaseClass2(1, 2, 3)), @@ -75,11 +75,11 @@ class B { } def f4(x: CaseSeq) = x match { case CaseSeq(x, y, z) => z :: Nil - case CaseSeq(x, y, z @ _*) => z + case CaseSeq(x, y, z : _*) => z } def f5(x: Any) = x match { case ExtractorSeq(x, y, z) => z } - def f6(x: Any) = x match { case ExtractorSeq(x, y, z @ _*) => z } + def f6(x: Any) = x match { case ExtractorSeq(x, y, z : _*) => z } def g1(x: CaseClass0) = x match { case CaseClass0() => true @@ -88,7 +88,7 @@ class B { case CaseClass0v() => true case CaseClass0v(5) => true case CaseClass0v(x) => true - case CaseClass0v(xs @ _*) => false + case CaseClass0v(xs : _*) => false } } diff --git a/tests/pending/run/patmatnew.scala b/tests/pending/run/patmatnew.scala index 3c0d00dc6..d55773e25 100644 --- a/tests/pending/run/patmatnew.scala +++ b/tests/pending/run/patmatnew.scala @@ -3,7 +3,7 @@ import scala.language.{ postfixOps } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { ApplyFromJcl.run() Bug1093.run() Bug1094.run() @@ -40,11 +40,11 @@ object Test { Ticket44.run() } - def assertEquals(a: Any, b: Any) { assert(a == b) } - def assertEquals(msg: String, a: Any, b: Any) { assert(a == b, msg) } + def assertEquals(a: Any, b: Any): Unit = { assert(a == b) } + def assertEquals(msg: String, a: Any, b: Any): Unit = { assert(a == b, msg) } object SimpleUnapply { - def run() { // from sortedmap, old version + def run(): Unit = { // from sortedmap, old version List((1, 2)).head match { case kv@(key, _) => kv.toString + " " + key.toString } @@ -54,10 +54,10 @@ object Test { object SeqUnapply { case class SFB(i: Int, xs: List[Int]) - def run() { + def run(): Unit = { List(1, 2) match { case List(1) => assert(false, "wrong case") - case List(1, 2, xs@_*) => assert(xs.isEmpty, "not empty") + case List(1, 2, xs:_*) => assert(xs.isEmpty, "not empty") case Nil => assert(false, "wrong case") } SFB(1, List(1)) match { @@ -68,7 +68,7 @@ object Test { } object ApplyFromJcl { - def run() { + def run(): Unit = { val p = (1, 2) Some(2) match { case Some(p._2) => @@ -78,7 +78,7 @@ object Test { } object TestSimpleIntSwitch { - def run() { + def run(): Unit = { assertEquals("s1", 1, 1 match { case 3 => 3 case 2 => 2 @@ -112,7 +112,7 @@ object Test { } val foo1 = new Foo(1) val foo2 = new Foo(2) - def run() { + def run(): Unit = { val res = (foo1.Bar(2): Any) match { case foo1.Bar(2) => true @@ -141,7 +141,7 @@ object Test { // multiple guards for same pattern object TestGuards extends Shmeez { val tree: Tree = Beez(2) - def run() { + def run(): Unit = { val res = tree match { case Beez(x) if x == 3 => false case Beez(x) if x == 2 => true @@ -158,7 +158,7 @@ object Test { // test EqualsPatternClass in combination with MixTypes opt, bug #1276 object TestEqualsPatternOpt { val NoContext = new Object - def run() { + def run(): Unit = { assertEquals(1, ((NoContext: Any) match { case that: AnyRef if this eq that => 0 case NoContext => 1 @@ -173,9 +173,9 @@ object Test { case List(_*) => "ok" } def doMatch2(xs: List[String]): List[String] = xs match { - case List(_, rest@_*) => rest.toList + case List(_, rest:_*) => rest.toList } - def run() { + def run(): Unit = { val list1 = List() assertEquals(doMatch(list1), "ok") val list2 = List("1", "2", "3") @@ -190,7 +190,7 @@ object Test { def doMatch(l: Seq[String]): String = l match { case Seq(_*) => "ok" } - def run() { + def run(): Unit = { val list1 = List() assertEquals(doMatch(list1), "ok") val list2 = List("1", "2", "3") @@ -208,7 +208,7 @@ object Test { case List(_, _, _, _*) => "ok" case _ => "not ok" } - def run() { + def run(): Unit = { val list1 = List() assertEquals(doMatch(list1), "not ok") val list2 = List("1", "2", "3") @@ -222,15 +222,15 @@ object Test { object TestSequence04 { case class Foo(i: Int, chars: Char*) - def run() { + def run(): Unit = { val a = Foo(0, 'a') match { - case Foo(i, c, chars@_*) => c + case Foo(i, c, chars:_*) => c case _ => null } assertEquals(a, 'a') val b = Foo(0, 'a') match { - case Foo(i, chars@_*) => 'b' + case Foo(i, chars:_*) => 'b' case _ => null } assertEquals(b, 'b') @@ -244,12 +244,12 @@ object Test { case class Foo() extends Con case class Bar(xs: Con*) extends Con - def run() { + def run(): Unit = { val res = (Bar(Foo()): Con) match { - case Bar(xs@_*) => xs // this should be optimized away to a pattern Bar(xs) + case Bar(xs:_*) => xs // this should be optimized away to a pattern Bar(xs) case _ => Nil } - assertEquals("res instance" + res.isInstanceOf[Seq[Con] forSome { type Con }] + " res(0)=" + res(0), true, res.isInstanceOf[Seq[Foo] forSome { type Foo }] && res(0) == Foo()) + assertEquals("res instance" + res.isInstanceOf[Seq[_]] + " res(0)=" + res(0), true, res.isInstanceOf[Seq[_]] && res(0) == Foo()) } } @@ -264,7 +264,7 @@ object Test { case A(A(1)) => 2 } - def run() { + def run(): Unit = { assertEquals(doMatch(A(null), 1), 0) assertEquals(doMatch(A(1), 2), 1) assertEquals(doMatch(A(A(1)), 2), 2) @@ -281,15 +281,15 @@ object Test { case List(x, y, z, w) => List(z, w) } def doMatch3(xs: Seq[Char]) = xs match { - case Seq(x, y, 'c', w@_*) => x :: y :: Nil - case Seq(x, y, z@_*) => z + case Seq(x, y, 'c', w:_*) => x :: y :: Nil + case Seq(x, y, z:_*) => z } def doMatch4(xs: Seq[Char]) = xs match { case Seq(x, 'b') => x :: 'b' :: Nil - case Seq(x, y, z@_*) => z.toList + case Seq(x, y, z:_*) => z.toList } - def run() { + def run(): Unit = { assertEquals(List('a', 'b'), doMatch1(List('a', 'b', 'c', 'd'))) assertEquals(List('c', 'd'), doMatch2(List('a', 'b', 'c', 'd'))) assertEquals(List('a', 'b'), doMatch3(List('a', 'b', 'c', 'd'))) @@ -299,7 +299,7 @@ object Test { // backquoted identifiers in pattern object TestSequence08 { - def run() { + def run(): Unit = { val xs = List(2, 3) val ys = List(1, 2, 3) match { case x :: `xs` => xs @@ -319,7 +319,7 @@ object Test { val str: Stream[Int] = List(1, 2, 3).iterator.toStream - def run() { assertEquals(sum(str), 6) } + def run(): Unit = { assertEquals(sum(str), 6) } } // bug#1163 order of temps must be preserved @@ -341,11 +341,11 @@ object Test { case n :: ls => flips((l take n reverse) ::: (l drop n)) + 1 } - def run() { assertEquals("both", (Var("x"), Var("y")), f) } + def run(): Unit = { assertEquals("both", (Var("x"), Var("y")), f) } } object TestUnbox { - def run() { + def run(): Unit = { val xyz: (Int, String, Boolean) = (1, "abc", true) xyz._1 match { case 1 => "OK" @@ -368,7 +368,7 @@ object Test { else Some(p.father) } - def run() { + def run(): Unit = { val p1 = new Person("p1", null) val p2 = new Person("p2", p1) assertEquals((p2.name, p1.name), p2 match { @@ -389,7 +389,7 @@ object Test { class Foo(j: Int) { case class Bar(i: Int) } - def run() { + def run(): Unit = { "baz" match { case Foo1(x) => Foo1.p(x) @@ -453,7 +453,7 @@ object Test { case Get(y) if y > 4 => // y gets a wildcard type for some reason?! hack } } - def run() { + def run(): Unit = { assert(!(new Buffer).ps.isDefinedAt(42)) } } @@ -471,7 +471,7 @@ object Test { case Get(xs) => // the argDummy <unapply-selector> should have proper arg.tpe (Int in this case) } } - def run() { + def run(): Unit = { assert(!(new Buffer).jp.isDefinedAt(40)) assert(!(new Buffer).jp.isDefinedAt(42)) } @@ -482,7 +482,7 @@ object Test { case x :: xs if xs.forall { y => y.hashCode() > 0 } => 1 } - def run() { + def run(): Unit = { val s: PartialFunction[Any, Any] = { case List(4 :: xs) => 1 case List(5 :: xs) => 1 @@ -527,7 +527,7 @@ object Test { } } - def run() { + def run(): Unit = { method1(); method2(); } @@ -544,7 +544,7 @@ object Test { case (EQ, 1) => "1" case (EQ, 2) => "2" } - def run() { + def run(): Unit = { val x = (EQ, 0); assertEquals("0", analyze(x)); // should print "0" val y = (EQ, 1); @@ -580,7 +580,7 @@ object Test { case _ => "n.a." } - def run() { + def run(): Unit = { // make up some class that has a size class MyNode extends SizeImpl assertEquals("!size 42", info(new MyNode)) @@ -596,13 +596,13 @@ object Test { case a: AnyRef if runtime.ScalaRunTime.isArray(a) => "Array" case _ => v.toString } - def run() { assertEquals("Array", foo(Array(0))) } + def run(): Unit = { assertEquals("Array", foo(Array(0))) } } // bug#1093 (contribution #460) object Bug1093 { - def run() { + def run(): Unit = { assert(Some(3) match { case Some(1 | 2) => false case Some(3) => true @@ -617,9 +617,9 @@ object Test { case class X(p: String, ps: String*) def bar = X("a", "b") match { - case X(p, ps@_*) => foo(ps: _*) + case X(p, ps:_*) => foo(ps: _*) } - def run() { assertEquals("Foo", bar) } + def run(): Unit = { assertEquals("Foo", bar) } } // #2 @@ -634,7 +634,7 @@ object Test { } object Ticket2 { - def run() { + def run(): Unit = { val o1 = new Outer_2; val o2 = new Outer_2; val x: Any = o1.Foo(1, 2); val y: Any = o2.Foo(1, 2) assert(x != y, "equals test returns true (but should not)") assert(x match { @@ -657,7 +657,7 @@ object Test { class MyException2 extends MyException1 with SpecialException object Ticket11 { - def run() { + def run(): Unit = { Array[Throwable](new Exception("abc"), new MyException1, new MyException2).foreach { e => @@ -678,9 +678,9 @@ object Test { // #37 object Ticket37 { - def foo() {} + def foo(): Unit = {} val (a, b) = { foo(); (2, 3) } - def run() { assertEquals(this.a, 2) } + def run(): Unit = { assertEquals(this.a, 2) } } // #44 @@ -699,11 +699,11 @@ object Test { } } object Ticket44 { - def run() { assert(Y.toString ne null) /*instantiate Y*/ } + def run(): Unit = { assert(Y.toString ne null) /*instantiate Y*/ } } object Ticket211 { - def run() { + def run(): Unit = { (Some(123): Option[Int]) match { case (x: Option[a]) if false => {}; case (y: Option[b]) => {}; @@ -755,7 +755,7 @@ object Test { case _ => false } - def run() { + def run(): Unit = { assert(empty(new L(Nil))) assert(singleton(new L(List(1)))) } diff --git a/tests/pending/run/pc-conversions.scala b/tests/pending/run/pc-conversions.scala index 5fecac9d9..effac118b 100644 --- a/tests/pending/run/pc-conversions.scala +++ b/tests/pending/run/pc-conversions.scala @@ -8,11 +8,11 @@ import collection._ // test conversions between collections object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { testConversions } - def testConversions { + def testConversions: Unit = { // seq conversions assertSeq(parallel.mutable.ParArray(1, 2, 3)) assertSeq(parallel.mutable.ParHashMap(1 -> 2, 2 -> 3)) @@ -62,7 +62,7 @@ object Test { def assertPar[T, P <: Parallel](xs: GenIterable[T]) = assert(xs == xs.par) - def assertToPar[K, V](xs: GenTraversable[(K, V)]) { + def assertToPar[K, V](xs: GenTraversable[(K, V)]): Unit = { xs match { case _: Seq[_] => assert(xs.toIterable.par == xs) @@ -80,7 +80,7 @@ object Test { assert(xs.par.toMap == xs.toMap) } - def assertToParWoMap[T](xs: GenSeq[T]) { + def assertToParWoMap[T](xs: GenSeq[T]): Unit = { assert(xs.toIterable.par == xs.toIterable) assert(xs.par.toIterable == xs.toIterable) diff --git a/tests/pending/run/pf-catch.scala b/tests/pending/run/pf-catch.scala index 33982d055..4f5153572 100644 --- a/tests/pending/run/pf-catch.scala +++ b/tests/pending/run/pf-catch.scala @@ -15,7 +15,7 @@ object Test { } def f1 = { - implicit val myHandler = standardHandler + implicit val myHandler: Test.Handler[String] = standardHandler println(fn(Nil.head)) println(fn(null.toString)) } diff --git a/tests/pending/run/position-val-def.scala b/tests/pending/run/position-val-def.scala index 62cb54acf..b79e120f7 100644 --- a/tests/pending/run/position-val-def.scala +++ b/tests/pending/run/position-val-def.scala @@ -6,8 +6,8 @@ import scala.tools.reflect.ToolBox object Test { val toolbox = cm.mkToolBox(options = "-Yrangepos") - def main(args: Array[String]) { - def test(expr: String) { + def main(args: Array[String]): Unit = { + def test(expr: String): Unit = { val t = toolbox.parse(expr) println(expr) println(show(t, printPositions = true)) diff --git a/tests/pending/run/predef-cycle.scala b/tests/pending/run/predef-cycle.scala index ab147688b..64b352bc4 100644 --- a/tests/pending/run/predef-cycle.scala +++ b/tests/pending/run/predef-cycle.scala @@ -1,11 +1,11 @@ class Force { val t1 = new Thread { - override def run() { + override def run(): Unit = { scala.`package` } } val t2 = new Thread { - override def run() { + override def run(): Unit = { scala.Predef } } @@ -16,7 +16,7 @@ class Force { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new Force() } } @@ -68,4 +68,4 @@ object Test { at scala.package$.<init>(package.scala:46) at scala.package$.<clinit>(package.scala) at Force$$anon$1.run(predef-cycle.scala:4) - */
\ No newline at end of file + */ diff --git a/tests/pending/run/priorityQueue.scala b/tests/pending/run/priorityQueue.scala index 327d8bf13..56f7ac3c8 100644 --- a/tests/pending/run/priorityQueue.scala +++ b/tests/pending/run/priorityQueue.scala @@ -11,7 +11,7 @@ import scala.collection.mutable.PriorityQueue // populate a priority queue a few different ways and make sure they all seem equal object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { // testInsertionsAndEqualities // testIntensiveEnqueueDequeue // testTails diff --git a/tests/pending/run/pure-args-byname-noinline.scala b/tests/pending/run/pure-args-byname-noinline.scala index 5c5c8a7eb..3ed4c480b 100644 --- a/tests/pending/run/pure-args-byname-noinline.scala +++ b/tests/pending/run/pure-args-byname-noinline.scala @@ -10,14 +10,14 @@ object Test { def foo() = println(2) def client(f: () => Unit) = {f(); f()} - def attempt2() { + def attempt2(): Unit = { val bar: () => Unit = foo _ //The code causing SI-6306 was supposed to optimize code like this: client(() => bar ()) //to: client(bar) } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { attempt2() f3(Seq(1)) f3(Seq()) diff --git a/tests/pending/run/range-unit.scala b/tests/pending/run/range-unit.scala index d8ebc00e9..730a1d7c1 100644 --- a/tests/pending/run/range-unit.scala +++ b/tests/pending/run/range-unit.scala @@ -31,7 +31,7 @@ object Test { catch { case e: IllegalArgumentException => List("---\n " + e) } } - def runGroup(label: String, f: (Int, Int, Int) => Range) { + def runGroup(label: String, f: (Int, Int, Int) => Range): Unit = { println(">>> " + label + " <<<\n") for (start <- endpoints) { val s = "%-7s %-7s %-7s %s".format("start", "end", "step", "length/first/last") diff --git a/tests/pending/run/range.scala b/tests/pending/run/range.scala index 4637ab874..ee934f627 100644 --- a/tests/pending/run/range.scala +++ b/tests/pending/run/range.scala @@ -50,8 +50,8 @@ object Test { } def main(args: Array[String]): Unit = { - implicit val imp1 = Numeric.BigDecimalAsIfIntegral - implicit val imp2 = Numeric.DoubleAsIfIntegral + implicit val imp1: Numeric.BigDecimalAsIfIntegral.type = Numeric.BigDecimalAsIfIntegral + implicit val imp2: Numeric.DoubleAsIfIntegral.type = Numeric.DoubleAsIfIntegral val _grs = List[GR[_]]( GR(BigDecimal(5.0)), diff --git a/tests/pending/run/reflection-companion.scala b/tests/pending/run/reflection-companion.scala index 0f62dead1..63929091c 100644 --- a/tests/pending/run/reflection-companion.scala +++ b/tests/pending/run/reflection-companion.scala @@ -13,4 +13,4 @@ object Test extends App { println(showRaw(symbolOf[T].companion, printKinds = true)) println(showRaw(cm.staticPackage("scala").moduleClass.companion, printKinds = true)) println(showRaw(cm.staticPackage("scala").companion, printKinds = true)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-companiontype.scala b/tests/pending/run/reflection-companiontype.scala index 0f6345767..1111bbd06 100644 --- a/tests/pending/run/reflection-companiontype.scala +++ b/tests/pending/run/reflection-companiontype.scala @@ -19,4 +19,4 @@ object Test extends App { println(showRaw(typeOf[T].companion, printKinds = true)) println(showRaw(cm.staticPackage("scala").moduleClass.asType.toType.companion, printKinds = true)) println(showRaw(cm.staticPackage("scala").info.companion, printKinds = true)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-constructormirror-inner-badpath.scala b/tests/pending/run/reflection-constructormirror-inner-badpath.scala index e7c06b32a..159aa1d51 100644 --- a/tests/pending/run/reflection-constructormirror-inner-badpath.scala +++ b/tests/pending/run/reflection-constructormirror-inner-badpath.scala @@ -29,4 +29,4 @@ class Foo{ object Test extends App{ val foo = new Foo println( foo.foo ) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-constructormirror-inner-good.scala b/tests/pending/run/reflection-constructormirror-inner-good.scala index c09da5b30..c57a8d4b7 100644 --- a/tests/pending/run/reflection-constructormirror-inner-good.scala +++ b/tests/pending/run/reflection-constructormirror-inner-good.scala @@ -23,4 +23,4 @@ class Foo{ object Test extends App{ val foo = new Foo println( foo.foo ) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-constructormirror-nested-badpath.scala b/tests/pending/run/reflection-constructormirror-nested-badpath.scala index cf0de77e1..c5beb95c6 100644 --- a/tests/pending/run/reflection-constructormirror-nested-badpath.scala +++ b/tests/pending/run/reflection-constructormirror-nested-badpath.scala @@ -29,4 +29,4 @@ object Test extends App{ ) val foo = new Foo println( foo.foo ) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-constructormirror-nested-good.scala b/tests/pending/run/reflection-constructormirror-nested-good.scala index 363b72046..7a5947a2b 100644 --- a/tests/pending/run/reflection-constructormirror-nested-good.scala +++ b/tests/pending/run/reflection-constructormirror-nested-good.scala @@ -23,4 +23,4 @@ object Test extends App{ ) val foo = new Foo println( foo.foo ) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-constructormirror-toplevel-badpath.scala b/tests/pending/run/reflection-constructormirror-toplevel-badpath.scala index eda4aa053..3fc9f3f55 100644 --- a/tests/pending/run/reflection-constructormirror-toplevel-badpath.scala +++ b/tests/pending/run/reflection-constructormirror-toplevel-badpath.scala @@ -30,4 +30,4 @@ class Foo{ object Test extends App{ val foo = new Foo println( foo.foo ) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-constructormirror-toplevel-good.scala b/tests/pending/run/reflection-constructormirror-toplevel-good.scala index 9842d0169..de9149fb4 100644 --- a/tests/pending/run/reflection-constructormirror-toplevel-good.scala +++ b/tests/pending/run/reflection-constructormirror-toplevel-good.scala @@ -24,4 +24,4 @@ class Foo{ object Test extends App{ val foo = new Foo println( foo.foo ) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-fancy-java-classes/Test_2.scala b/tests/pending/run/reflection-fancy-java-classes/Test_2.scala index 271960ee7..4dbf28552 100644 --- a/tests/pending/run/reflection-fancy-java-classes/Test_2.scala +++ b/tests/pending/run/reflection-fancy-java-classes/Test_2.scala @@ -17,4 +17,4 @@ object Test extends App { val sfancy = cm.classSymbol(jfancy) println(sfancy) println(sfancy.owner) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-fieldsymbol-navigation.scala b/tests/pending/run/reflection-fieldsymbol-navigation.scala index 33dc18a7e..924d97f5e 100644 --- a/tests/pending/run/reflection-fieldsymbol-navigation.scala +++ b/tests/pending/run/reflection-fieldsymbol-navigation.scala @@ -12,4 +12,4 @@ object Test extends App { println(x.accessed.asTerm.isVar) println(x.getter) println(x.setter) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-idtc.scala b/tests/pending/run/reflection-idtc.scala index f9eae612f..c2b0347c7 100644 --- a/tests/pending/run/reflection-idtc.scala +++ b/tests/pending/run/reflection-idtc.scala @@ -13,4 +13,4 @@ object Test extends App { println(idTC2) println(appliedType(idTC2, List(typeOf[Int]))) println(appliedType(idTC2, List(typeOf[Int])).dealias) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-implicit.scala b/tests/pending/run/reflection-implicit.scala index a6e939322..1e104d1e5 100644 --- a/tests/pending/run/reflection-implicit.scala +++ b/tests/pending/run/reflection-implicit.scala @@ -3,7 +3,7 @@ import scala.language.implicitConversions import scala.reflect.runtime.universe._ class C { - implicit val v = new C + implicit val v: C = new C implicit def d(x: C)(implicit c: C): Int = ??? implicit class X(val x: Int) } diff --git a/tests/pending/run/reflection-magicsymbols-invoke.scala b/tests/pending/run/reflection-magicsymbols-invoke.scala index 793f78bff..1fff85171 100644 --- a/tests/pending/run/reflection-magicsymbols-invoke.scala +++ b/tests/pending/run/reflection-magicsymbols-invoke.scala @@ -10,7 +10,7 @@ package scala { object Test extends App { def key(sym: Symbol) = sym + ": " + sym.info - def test(tpe: Type, receiver: Any, method: String, args: Any*) { + def test(tpe: Type, receiver: Any, method: String, args: Any*): Unit = { def wrap[T](op: => T) = try { var result = op.asInstanceOf[AnyRef] @@ -97,4 +97,4 @@ object Test extends App { test(PredefModule.moduleClass.info, Predef, "classOf") test(PredefModule.moduleClass.info, Predef, "classOf", typeOf[String]) test(typeOf[scala.reflect.api.Universe], scala.reflect.runtime.universe, "reify", "2") -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-methodsymbol-params.scala b/tests/pending/run/reflection-methodsymbol-params.scala index bc1289a62..d8d76b2db 100644 --- a/tests/pending/run/reflection-methodsymbol-params.scala +++ b/tests/pending/run/reflection-methodsymbol-params.scala @@ -21,4 +21,4 @@ object Test extends App { println(typeOf[C].member(TermName("y2")).asMethod.paramLists) println(typeOf[C].member(TermName("y3")).asMethod.paramLists) println(typeOf[C].member(TermName("y4")).asMethod.paramLists) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-methodsymbol-returntype.scala b/tests/pending/run/reflection-methodsymbol-returntype.scala index 74a9e5dac..7cf5aa0c1 100644 --- a/tests/pending/run/reflection-methodsymbol-returntype.scala +++ b/tests/pending/run/reflection-methodsymbol-returntype.scala @@ -21,4 +21,4 @@ object Test extends App { println(typeOf[C].member(TermName("y2")).asMethod.returnType) println(typeOf[C].member(TermName("y3")).asMethod.returnType) println(typeOf[C].member(TermName("y4")).asMethod.returnType) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-methodsymbol-typeparams.scala b/tests/pending/run/reflection-methodsymbol-typeparams.scala index 56d37ebea..51b52b24c 100644 --- a/tests/pending/run/reflection-methodsymbol-typeparams.scala +++ b/tests/pending/run/reflection-methodsymbol-typeparams.scala @@ -21,4 +21,4 @@ object Test extends App { println(typeOf[C].member(TermName("y2")).asMethod.typeParams) println(typeOf[C].member(TermName("y3")).asMethod.typeParams) println(typeOf[C].member(TermName("y4")).asMethod.typeParams) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-modulemirror-inner-badpath.scala b/tests/pending/run/reflection-modulemirror-inner-badpath.scala index de200c548..6ecb4234f 100644 --- a/tests/pending/run/reflection-modulemirror-inner-badpath.scala +++ b/tests/pending/run/reflection-modulemirror-inner-badpath.scala @@ -21,4 +21,4 @@ class Foo{ object Test extends App{ val foo = new Foo println(foo.foo) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-modulemirror-inner-good.scala b/tests/pending/run/reflection-modulemirror-inner-good.scala index b5540dbe1..ec66c9160 100644 --- a/tests/pending/run/reflection-modulemirror-inner-good.scala +++ b/tests/pending/run/reflection-modulemirror-inner-good.scala @@ -20,4 +20,4 @@ class Foo{ object Test extends App{ val foo = new Foo println(foo.foo) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-modulemirror-nested-good.scala b/tests/pending/run/reflection-modulemirror-nested-good.scala index 8390bbaac..cc123dbec 100644 --- a/tests/pending/run/reflection-modulemirror-nested-good.scala +++ b/tests/pending/run/reflection-modulemirror-nested-good.scala @@ -21,4 +21,4 @@ object Test extends App{ object R { override def toString = "R" } val foo = new Foo println(foo.foo) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-modulemirror-toplevel-badpath.scala b/tests/pending/run/reflection-modulemirror-toplevel-badpath.scala index 8b2994cab..9fc69599f 100644 --- a/tests/pending/run/reflection-modulemirror-toplevel-badpath.scala +++ b/tests/pending/run/reflection-modulemirror-toplevel-badpath.scala @@ -23,4 +23,4 @@ class Foo{ object Test extends App{ val foo = new Foo println(foo.foo) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-modulemirror-toplevel-good.scala b/tests/pending/run/reflection-modulemirror-toplevel-good.scala index 0663136a2..6ca1071dd 100644 --- a/tests/pending/run/reflection-modulemirror-toplevel-good.scala +++ b/tests/pending/run/reflection-modulemirror-toplevel-good.scala @@ -17,4 +17,4 @@ class Foo{ object Test extends App{ val foo = new Foo println(foo.foo) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-sanitychecks.scala b/tests/pending/run/reflection-sanitychecks.scala index 3f4873bbe..47dfcdcc2 100644 --- a/tests/pending/run/reflection-sanitychecks.scala +++ b/tests/pending/run/reflection-sanitychecks.scala @@ -46,4 +46,4 @@ object Test extends App { test(typeOf[C]) test(typeOf[D]) test(typeOf[E]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-sorted-decls.scala b/tests/pending/run/reflection-sorted-decls.scala index 8dcb0f3ec..9befd942c 100644 --- a/tests/pending/run/reflection-sorted-decls.scala +++ b/tests/pending/run/reflection-sorted-decls.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { class Foo(val a: Int, val b: Int, val c: Int) import scala.reflect.runtime.{currentMirror => cm} val decls = cm.classSymbol(classOf[Foo]).info.decls diff --git a/tests/pending/run/reflection-sorted-members.scala b/tests/pending/run/reflection-sorted-members.scala index fa028c99c..7a09f9d29 100644 --- a/tests/pending/run/reflection-sorted-members.scala +++ b/tests/pending/run/reflection-sorted-members.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { trait T1 { def a: Int; def c: Int } trait T2 { def a: Int; def b: Int } class Bar(val x: Int) diff --git a/tests/pending/run/reflection-sync-potpourri.scala b/tests/pending/run/reflection-sync-potpourri.scala index f65131f18..0af48bb20 100644 --- a/tests/pending/run/reflection-sync-potpourri.scala +++ b/tests/pending/run/reflection-sync-potpourri.scala @@ -29,4 +29,4 @@ object Test extends App { } }) threads foreach (_.start) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-sync-subtypes.scala b/tests/pending/run/reflection-sync-subtypes.scala index 7f75a464a..bcfb24ebb 100644 --- a/tests/pending/run/reflection-sync-subtypes.scala +++ b/tests/pending/run/reflection-sync-subtypes.scala @@ -4,8 +4,8 @@ object Test extends App { val n = 1000 val rng = new scala.util.Random() val tasks = List( - () => typeOf[List[Int]] <:< typeOf[List[T] forSome { type T }], - () => typeOf[List[T] forSome { type T }] <:< typeOf[List[Any]], + () => typeOf[List[Int]] <:< typeOf[List[_]], + () => typeOf[List[_]] <:< typeOf[List[Any]], () => typeOf[Map[Int, Object]] <:< typeOf[Iterable[(Int, String)]], () => typeOf[Expr[Any] { val mirror: rootMirror.type }] <:< typeOf[Expr[List[List[List[Int]]]]{ val mirror: rootMirror.type }]) val perms = tasks.permutations.toList @@ -17,4 +17,4 @@ object Test extends App { } }) threads foreach (_.start) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-tags.scala b/tests/pending/run/reflection-tags.scala index 3d7c7b2a0..54b561b57 100644 --- a/tests/pending/run/reflection-tags.scala +++ b/tests/pending/run/reflection-tags.scala @@ -18,4 +18,4 @@ object Test extends App { case _ => false })) println(outliers) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-valueclasses-derived.scala b/tests/pending/run/reflection-valueclasses-derived.scala index 8d25e2929..8c03c2aab 100644 --- a/tests/pending/run/reflection-valueclasses-derived.scala +++ b/tests/pending/run/reflection-valueclasses-derived.scala @@ -9,4 +9,4 @@ object Test extends App { println(cm.reflect(new C(2)).reflectMethod(typeOf[C].member(TermName("foo")).asMethod)(2)) println(cm.reflect(new C(2)).reflectMethod(typeOf[C].member(TermName("getClass")).asMethod)()) println(cm.reflect(new C(2)).reflectMethod(typeOf[C].member(TermName("toString")).asMethod)()) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-valueclasses-magic.scala b/tests/pending/run/reflection-valueclasses-magic.scala index 366b5fe27..e045b882f 100644 --- a/tests/pending/run/reflection-valueclasses-magic.scala +++ b/tests/pending/run/reflection-valueclasses-magic.scala @@ -32,7 +32,7 @@ object Test extends App { else throw new Exception(s"not supported: value = $value, tpe = $tpe") } - def test[T: ClassTag](tpe: Type, receiver: T, method: String, args: Any*) { + def test[T: ClassTag](tpe: Type, receiver: T, method: String, args: Any*): Unit = { def wrap[T](op: => T) = try { var result = op.asInstanceOf[AnyRef] @@ -52,14 +52,14 @@ object Test extends App { wrap(cm.reflect(receiver).reflectMethod(testee)(convertedArgs: _*)) }) } - def header(tpe: Type) { + def header(tpe: Type): Unit = { println(s"============\n$tpe") println("it's important to print the list of Byte's members") println("if some of them change (possibly, adding and/or removing magic symbols), we must update this test") tpe.members.toList.sortBy(key).foreach(sym => println(key(sym))) } - def testNumeric[T: ClassTag](tpe: Type, value: T) { + def testNumeric[T: ClassTag](tpe: Type, value: T): Unit = { header(tpe) List("toByte", "toShort", "toChar", "toInt", "toLong", "toFloat", "toDouble") foreach (meth => test(tpe, value, meth)) test(tpe, value, "==", 2) @@ -75,7 +75,7 @@ object Test extends App { test(tpe, value, "%", 2) } - def testIntegral[T: ClassTag](tpe: Type, value: T) { + def testIntegral[T: ClassTag](tpe: Type, value: T): Unit = { testNumeric(tpe, value) test(tpe, value, "unary_~") test(tpe, value, "unary_+") @@ -88,7 +88,7 @@ object Test extends App { test(tpe, value, "^", 2) } - def testBoolean() { + def testBoolean(): Unit = { header(typeOf[Boolean]) test(typeOf[Boolean], true, "unary_!") test(typeOf[Boolean], true, "==", true) @@ -100,7 +100,7 @@ object Test extends App { test(typeOf[Boolean], true, "^", true) } - def testUnit() { + def testUnit(): Unit = { header(typeOf[Unit]) } @@ -113,4 +113,4 @@ object Test extends App { testNumeric(typeOf[Double], 2.toDouble) testBoolean() testUnit() -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflection-valueclasses-standard.scala b/tests/pending/run/reflection-valueclasses-standard.scala index b6b5a2ede..74719dcf5 100644 --- a/tests/pending/run/reflection-valueclasses-standard.scala +++ b/tests/pending/run/reflection-valueclasses-standard.scala @@ -18,4 +18,4 @@ object Test extends App { test('2') test(true) test(()) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reflinit.scala b/tests/pending/run/reflinit.scala index 6d3ba3a4d..979dfb380 100644 --- a/tests/pending/run/reflinit.scala +++ b/tests/pending/run/reflinit.scala @@ -3,4 +3,4 @@ import scala.reflect.runtime.universe._ object Test extends App { val tt2 = typeOf[List[Int]] println(tt2) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify-aliases.scala b/tests/pending/run/reify-aliases.scala index 45b1a34e2..31141f3ac 100644 --- a/tests/pending/run/reify-aliases.scala +++ b/tests/pending/run/reify-aliases.scala @@ -2,4 +2,4 @@ import scala.reflect.runtime.universe._ object Test extends App { println(showRaw(typeOf[String])) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify-each-node-type.scala b/tests/pending/run/reify-each-node-type.scala index 425061f95..43d32e59d 100644 --- a/tests/pending/run/reify-each-node-type.scala +++ b/tests/pending/run/reify-each-node-type.scala @@ -45,10 +45,10 @@ object s { act(reify { val x: Int = 0 /* ValDef */ }) act(reify { val x = 0 /* TypeTree */ }) act(reify { if (true) () /* If */ }) - act(reify { def f { } /* DefDef */ }) + act(reify { def f: Unit = { } /* DefDef */ }) act(reify { def m = super.q /* Super */ }) act(reify { trait A /* ClassDef Template */ }) - act(reify { def f(x: Any) { } /* EmptyTree */ }) + act(reify { def f(x: Any): Unit = { } /* EmptyTree */ }) act(reify { null: D with E /* CompoundTypeTree */ }) act(reify { type T = Int /* TypeDef */ }) act(reify { type CC[T <: D] = C[T] /* TypeBoundsTree */ }) diff --git a/tests/pending/run/reify_ann1a.scala b/tests/pending/run/reify_ann1a.scala index e3ff9e532..1078514ea 100644 --- a/tests/pending/run/reify_ann1a.scala +++ b/tests/pending/run/reify_ann1a.scala @@ -25,4 +25,4 @@ object Test extends App { // test 3: import and compile toolbox.eval(tree) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_ann1b.scala b/tests/pending/run/reify_ann1b.scala index 30bafadf7..847120edb 100644 --- a/tests/pending/run/reify_ann1b.scala +++ b/tests/pending/run/reify_ann1b.scala @@ -25,4 +25,4 @@ object Test extends App { // test 3: import and compile toolbox.eval(tree) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_ann2a.scala b/tests/pending/run/reify_ann2a.scala index 515fba015..7ae2dc48d 100644 --- a/tests/pending/run/reify_ann2a.scala +++ b/tests/pending/run/reify_ann2a.scala @@ -25,4 +25,4 @@ object Test extends App { // test 3: import and compile toolbox.eval(tree) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_ann3.scala b/tests/pending/run/reify_ann3.scala index 7098e928a..be9f9c8e9 100644 --- a/tests/pending/run/reify_ann3.scala +++ b/tests/pending/run/reify_ann3.scala @@ -19,4 +19,4 @@ object Test extends App { // test 3: import and compile toolbox.eval(tree) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_ann4.scala b/tests/pending/run/reify_ann4.scala index f6426213d..6ba4b8c21 100644 --- a/tests/pending/run/reify_ann4.scala +++ b/tests/pending/run/reify_ann4.scala @@ -23,4 +23,4 @@ object Test extends App { // test 3: import and compile toolbox.eval(tree) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_ann5.scala b/tests/pending/run/reify_ann5.scala index 5e2f058a3..3cc355249 100644 --- a/tests/pending/run/reify_ann5.scala +++ b/tests/pending/run/reify_ann5.scala @@ -20,4 +20,4 @@ object Test extends App { // test 3: import and compile toolbox.eval(tree) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_anonymous.scala b/tests/pending/run/reify_anonymous.scala index d743014df..f2e9a5023 100644 --- a/tests/pending/run/reify_anonymous.scala +++ b/tests/pending/run/reify_anonymous.scala @@ -5,4 +5,4 @@ object Test extends App { reify { println(new {def x = 2; def y = x * x}.y) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_classfileann_a.scala b/tests/pending/run/reify_classfileann_a.scala index 9ae12bff8..7df81f2b5 100644 --- a/tests/pending/run/reify_classfileann_a.scala +++ b/tests/pending/run/reify_classfileann_a.scala @@ -19,4 +19,4 @@ object Test extends App { // test 3: import and compile toolbox.eval(tree) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_classfileann_b.scala b/tests/pending/run/reify_classfileann_b.scala index a0cb8f0b4..8ddab9bc5 100644 --- a/tests/pending/run/reify_classfileann_b.scala +++ b/tests/pending/run/reify_classfileann_b.scala @@ -23,4 +23,4 @@ object Test extends App { // test 3: import and compile toolbox.eval(tree) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_closure1.scala b/tests/pending/run/reify_closure1.scala index af24a4b1e..0652cff8c 100644 --- a/tests/pending/run/reify_closure1.scala +++ b/tests/pending/run/reify_closure1.scala @@ -16,4 +16,4 @@ object Test extends App { println(foo(List(1, 2, 3))(10)) println(foo(List(1, 2, 3, 4))(10)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_closure2a.scala b/tests/pending/run/reify_closure2a.scala index 7a2cdb5e1..fa66ef697 100644 --- a/tests/pending/run/reify_closure2a.scala +++ b/tests/pending/run/reify_closure2a.scala @@ -16,4 +16,4 @@ object Test extends App { println(foo(1)(10)) println(foo(2)(10)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_closure3a.scala b/tests/pending/run/reify_closure3a.scala index cb17c8950..945416c05 100644 --- a/tests/pending/run/reify_closure3a.scala +++ b/tests/pending/run/reify_closure3a.scala @@ -18,4 +18,4 @@ object Test extends App { println(foo(1)(10)) println(foo(2)(10)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_closure4a.scala b/tests/pending/run/reify_closure4a.scala index 23436e076..6e7cce7de 100644 --- a/tests/pending/run/reify_closure4a.scala +++ b/tests/pending/run/reify_closure4a.scala @@ -18,4 +18,4 @@ object Test extends App { println(foo(1)(10)) println(foo(2)(10)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_closure5a.scala b/tests/pending/run/reify_closure5a.scala index 6b5089a4e..f8a39ee2e 100644 --- a/tests/pending/run/reify_closure5a.scala +++ b/tests/pending/run/reify_closure5a.scala @@ -18,4 +18,4 @@ object Test extends App { println(fun1(10)) var fun2 = foo(List(1, 2, 3, 4)) println(fun2(10)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_closure6.scala b/tests/pending/run/reify_closure6.scala index cba035132..beaf17e6c 100644 --- a/tests/pending/run/reify_closure6.scala +++ b/tests/pending/run/reify_closure6.scala @@ -26,4 +26,4 @@ object Test extends App { val fun2 = foo(List(1, 2, 3, 4)) println("second invocation = " + fun2(10)) println("q after second invocation = " + q) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_closure7.scala b/tests/pending/run/reify_closure7.scala index 2a7ce25e8..7c0ff0b28 100644 --- a/tests/pending/run/reify_closure7.scala +++ b/tests/pending/run/reify_closure7.scala @@ -30,4 +30,4 @@ object Test extends App { println("first invocation = " + fun1(10)) val fun2 = foo(List(1, 2, 3, 4)) println("second invocation = " + fun2(10)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_closure8a.scala b/tests/pending/run/reify_closure8a.scala index f303a7511..150db0f5c 100644 --- a/tests/pending/run/reify_closure8a.scala +++ b/tests/pending/run/reify_closure8a.scala @@ -12,4 +12,4 @@ object Test extends App { val dyn = toolbox.eval(new Foo(10).fun.tree) val foo = dyn.asInstanceOf[Int] println(foo) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_closure8b.scala b/tests/pending/run/reify_closure8b.scala index c693cb490..b5322896f 100644 --- a/tests/pending/run/reify_closure8b.scala +++ b/tests/pending/run/reify_closure8b.scala @@ -18,4 +18,4 @@ object Test extends App { case ex: Throwable => println(ex) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_closures10.scala b/tests/pending/run/reify_closures10.scala index a2740c836..cd25453b8 100644 --- a/tests/pending/run/reify_closures10.scala +++ b/tests/pending/run/reify_closures10.scala @@ -10,4 +10,4 @@ object Test extends App { val toolbox = cm.mkToolBox() println(toolbox.eval(code.tree)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_complex.scala b/tests/pending/run/reify_complex.scala index 4abec3900..885a6323b 100644 --- a/tests/pending/run/reify_complex.scala +++ b/tests/pending/run/reify_complex.scala @@ -22,4 +22,4 @@ object Test extends App { val x = new Complex(2, 1); val y = new Complex(1, 3) println(x + y) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_copypaste1.scala b/tests/pending/run/reify_copypaste1.scala index cf813182a..12cc7dfe1 100644 --- a/tests/pending/run/reify_copypaste1.scala +++ b/tests/pending/run/reify_copypaste1.scala @@ -16,4 +16,4 @@ object Test extends App { output.reset() toolBox.eval(Block(stats, expr)) stdout.println(output.toString) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_copypaste2.scala b/tests/pending/run/reify_copypaste2.scala index 12d08cf24..e64a729df 100644 --- a/tests/pending/run/reify_copypaste2.scala +++ b/tests/pending/run/reify_copypaste2.scala @@ -7,4 +7,4 @@ object Test extends App { val x = 2 val outer = reify{reify{x}} println(outer.tree) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_for1.scala b/tests/pending/run/reify_for1.scala index e1f534757..e0d7e41bc 100644 --- a/tests/pending/run/reify_for1.scala +++ b/tests/pending/run/reify_for1.scala @@ -7,4 +7,4 @@ object Test extends App { val sumOfSquares2 = (1 to 100).filter(_ % 3 == 0).map(Math.pow(_, 2)).sum assert(sumOfSquares1 == sumOfSquares2) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_fors_newpatmat.scala b/tests/pending/run/reify_fors_newpatmat.scala index 6bee9538a..e01f0f6c6 100644 --- a/tests/pending/run/reify_fors_newpatmat.scala +++ b/tests/pending/run/reify_fors_newpatmat.scala @@ -98,4 +98,4 @@ object Test extends App { val ys = List(2.0, 1.0, 3.0) println("scalProd(" + xs + ", " + ys +") = " + scalProd(xs, ys)) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_fors_oldpatmat.scala b/tests/pending/run/reify_fors_oldpatmat.scala index 6bee9538a..e01f0f6c6 100644 --- a/tests/pending/run/reify_fors_oldpatmat.scala +++ b/tests/pending/run/reify_fors_oldpatmat.scala @@ -98,4 +98,4 @@ object Test extends App { val ys = List(2.0, 1.0, 3.0) println("scalProd(" + xs + ", " + ys +") = " + scalProd(xs, ys)) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_generic.scala b/tests/pending/run/reify_generic.scala index 7baffac6a..35a46f686 100644 --- a/tests/pending/run/reify_generic.scala +++ b/tests/pending/run/reify_generic.scala @@ -6,4 +6,4 @@ object Test extends App { val product = List(1, 2, 3).head * List[Any](4, 2, 0).head.asInstanceOf[Int] println(product) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_generic2.scala b/tests/pending/run/reify_generic2.scala index 36ab61e07..0582f6aaa 100644 --- a/tests/pending/run/reify_generic2.scala +++ b/tests/pending/run/reify_generic2.scala @@ -7,4 +7,4 @@ object Test extends App { val product = List(new C, new C).length * List[C](new C, new C).length println(product) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_getter.scala b/tests/pending/run/reify_getter.scala index cb04ddffd..054baf108 100644 --- a/tests/pending/run/reify_getter.scala +++ b/tests/pending/run/reify_getter.scala @@ -15,4 +15,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_inheritance.scala b/tests/pending/run/reify_inheritance.scala index c73266443..bbd0a46e4 100644 --- a/tests/pending/run/reify_inheritance.scala +++ b/tests/pending/run/reify_inheritance.scala @@ -14,4 +14,4 @@ object Test extends App { println(new D().y * new C().x) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_inner1.scala b/tests/pending/run/reify_inner1.scala index 8da338ee4..9238bbb73 100644 --- a/tests/pending/run/reify_inner1.scala +++ b/tests/pending/run/reify_inner1.scala @@ -13,4 +13,4 @@ object Test extends App { val inner = new outer.D() println(inner.x) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_inner2.scala b/tests/pending/run/reify_inner2.scala index f82eff8f0..6616bae72 100644 --- a/tests/pending/run/reify_inner2.scala +++ b/tests/pending/run/reify_inner2.scala @@ -13,4 +13,4 @@ object Test extends App { val inner = outer.D println(inner.x) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_inner3.scala b/tests/pending/run/reify_inner3.scala index 72f8d9a38..859b63f94 100644 --- a/tests/pending/run/reify_inner3.scala +++ b/tests/pending/run/reify_inner3.scala @@ -13,4 +13,4 @@ object Test extends App { val inner = new outer.D println(inner.x) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_inner4.scala b/tests/pending/run/reify_inner4.scala index ecbbf149a..e2fc921c5 100644 --- a/tests/pending/run/reify_inner4.scala +++ b/tests/pending/run/reify_inner4.scala @@ -13,4 +13,4 @@ object Test extends App { val inner = outer.D println(inner.x) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_magicsymbols.scala b/tests/pending/run/reify_magicsymbols.scala index 256ecbea3..54a6eab9c 100644 --- a/tests/pending/run/reify_magicsymbols.scala +++ b/tests/pending/run/reify_magicsymbols.scala @@ -14,4 +14,4 @@ object Test extends App { println(typeOf[{def foo(x: Int): Int}]) println(typeOf[(Int*) => Unit]) println(typeOf[(=> Int) => Unit]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_maps_newpatmat.scala b/tests/pending/run/reify_maps_newpatmat.scala index b538355b0..57c9d560a 100644 --- a/tests/pending/run/reify_maps_newpatmat.scala +++ b/tests/pending/run/reify_maps_newpatmat.scala @@ -17,4 +17,4 @@ object Test extends App { } ) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_maps_oldpatmat.scala b/tests/pending/run/reify_maps_oldpatmat.scala index b538355b0..57c9d560a 100644 --- a/tests/pending/run/reify_maps_oldpatmat.scala +++ b/tests/pending/run/reify_maps_oldpatmat.scala @@ -17,4 +17,4 @@ object Test extends App { } ) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_metalevel_breach_+0_refers_to_1.scala b/tests/pending/run/reify_metalevel_breach_+0_refers_to_1.scala index 76f935ecd..3ca47c436 100644 --- a/tests/pending/run/reify_metalevel_breach_+0_refers_to_1.scala +++ b/tests/pending/run/reify_metalevel_breach_+0_refers_to_1.scala @@ -15,4 +15,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_metalevel_breach_-1_refers_to_0_a.scala b/tests/pending/run/reify_metalevel_breach_-1_refers_to_0_a.scala index e7c5cb71c..a8b45b3a4 100644 --- a/tests/pending/run/reify_metalevel_breach_-1_refers_to_0_a.scala +++ b/tests/pending/run/reify_metalevel_breach_-1_refers_to_0_a.scala @@ -13,4 +13,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_metalevel_breach_-1_refers_to_0_b.scala b/tests/pending/run/reify_metalevel_breach_-1_refers_to_0_b.scala index 770fcccd1..7378774ba 100644 --- a/tests/pending/run/reify_metalevel_breach_-1_refers_to_0_b.scala +++ b/tests/pending/run/reify_metalevel_breach_-1_refers_to_0_b.scala @@ -18,4 +18,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_metalevel_breach_-1_refers_to_1.scala b/tests/pending/run/reify_metalevel_breach_-1_refers_to_1.scala index 32e7e9003..f2fb53400 100644 --- a/tests/pending/run/reify_metalevel_breach_-1_refers_to_1.scala +++ b/tests/pending/run/reify_metalevel_breach_-1_refers_to_1.scala @@ -15,4 +15,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_nested_inner_refers_to_global.scala b/tests/pending/run/reify_nested_inner_refers_to_global.scala index 877222f5b..e98457329 100644 --- a/tests/pending/run/reify_nested_inner_refers_to_global.scala +++ b/tests/pending/run/reify_nested_inner_refers_to_global.scala @@ -14,4 +14,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_nested_inner_refers_to_local.scala b/tests/pending/run/reify_nested_inner_refers_to_local.scala index 703474e07..802071ffb 100644 --- a/tests/pending/run/reify_nested_inner_refers_to_local.scala +++ b/tests/pending/run/reify_nested_inner_refers_to_local.scala @@ -14,4 +14,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_nested_outer_refers_to_global.scala b/tests/pending/run/reify_nested_outer_refers_to_global.scala index e40c569ce..374f8a536 100644 --- a/tests/pending/run/reify_nested_outer_refers_to_global.scala +++ b/tests/pending/run/reify_nested_outer_refers_to_global.scala @@ -16,4 +16,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_nested_outer_refers_to_local.scala b/tests/pending/run/reify_nested_outer_refers_to_local.scala index 12147c51d..2d6fd6417 100644 --- a/tests/pending/run/reify_nested_outer_refers_to_local.scala +++ b/tests/pending/run/reify_nested_outer_refers_to_local.scala @@ -16,4 +16,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_01.scala b/tests/pending/run/reify_newimpl_01.scala index e4b46e428..20167da16 100644 --- a/tests/pending/run/reify_newimpl_01.scala +++ b/tests/pending/run/reify_newimpl_01.scala @@ -10,4 +10,4 @@ object Test extends App { } println(code.eval) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_02.scala b/tests/pending/run/reify_newimpl_02.scala index fa7ee17ac..4d72c7809 100644 --- a/tests/pending/run/reify_newimpl_02.scala +++ b/tests/pending/run/reify_newimpl_02.scala @@ -10,4 +10,4 @@ object Test extends App { } println(code.eval) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_03.scala b/tests/pending/run/reify_newimpl_03.scala index 8d6542552..2fbd89ccb 100644 --- a/tests/pending/run/reify_newimpl_03.scala +++ b/tests/pending/run/reify_newimpl_03.scala @@ -10,4 +10,4 @@ object Test extends App { } println(code.eval) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_04.scala b/tests/pending/run/reify_newimpl_04.scala index 21341ed10..c75207b30 100644 --- a/tests/pending/run/reify_newimpl_04.scala +++ b/tests/pending/run/reify_newimpl_04.scala @@ -10,4 +10,4 @@ object Test extends App { } println(code.eval) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_05.scala b/tests/pending/run/reify_newimpl_05.scala index 635eba382..758a296e3 100644 --- a/tests/pending/run/reify_newimpl_05.scala +++ b/tests/pending/run/reify_newimpl_05.scala @@ -11,4 +11,4 @@ object Test extends App { } println(code.eval) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_06.scala b/tests/pending/run/reify_newimpl_06.scala index 0bf37da8c..49022e962 100644 --- a/tests/pending/run/reify_newimpl_06.scala +++ b/tests/pending/run/reify_newimpl_06.scala @@ -10,4 +10,4 @@ object Test extends App { } println(new C(2).code.eval) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_11.scala b/tests/pending/run/reify_newimpl_11.scala index e8ca66441..9cc15747d 100644 --- a/tests/pending/run/reify_newimpl_11.scala +++ b/tests/pending/run/reify_newimpl_11.scala @@ -16,4 +16,4 @@ object Test extends App { case ex: Throwable => println(ex) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_12.scala b/tests/pending/run/reify_newimpl_12.scala index 246d7b4d4..739f6ff67 100644 --- a/tests/pending/run/reify_newimpl_12.scala +++ b/tests/pending/run/reify_newimpl_12.scala @@ -11,4 +11,4 @@ object Test extends App { } new C[Int] -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_13.scala b/tests/pending/run/reify_newimpl_13.scala index 1b2b8cb52..5aa14aa55 100644 --- a/tests/pending/run/reify_newimpl_13.scala +++ b/tests/pending/run/reify_newimpl_13.scala @@ -18,4 +18,4 @@ object Test extends App { println(ex) } } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_14.scala b/tests/pending/run/reify_newimpl_14.scala index 284e87acd..547df10c0 100644 --- a/tests/pending/run/reify_newimpl_14.scala +++ b/tests/pending/run/reify_newimpl_14.scala @@ -13,4 +13,4 @@ object Test extends App { new C[Int] } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_15.scala b/tests/pending/run/reify_newimpl_15.scala index cb66e8549..504cdf7c7 100644 --- a/tests/pending/run/reify_newimpl_15.scala +++ b/tests/pending/run/reify_newimpl_15.scala @@ -12,4 +12,4 @@ object Test extends App { } new C -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_18.scala b/tests/pending/run/reify_newimpl_18.scala index 8456fd1b8..7d6401c62 100644 --- a/tests/pending/run/reify_newimpl_18.scala +++ b/tests/pending/run/reify_newimpl_18.scala @@ -12,4 +12,4 @@ object Test extends App { } new C[Int] -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_19.scala b/tests/pending/run/reify_newimpl_19.scala index ba2d39cfd..eca455279 100644 --- a/tests/pending/run/reify_newimpl_19.scala +++ b/tests/pending/run/reify_newimpl_19.scala @@ -17,4 +17,4 @@ object Test extends App { case ex: Throwable => println(ex) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_20.scala b/tests/pending/run/reify_newimpl_20.scala index f8ddb53a2..b5c649902 100644 --- a/tests/pending/run/reify_newimpl_20.scala +++ b/tests/pending/run/reify_newimpl_20.scala @@ -13,4 +13,4 @@ object Test extends App { } new C { type T = String } // this "mistake" is made for a reason! -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_21.scala b/tests/pending/run/reify_newimpl_21.scala index 97261b21e..ff78d9bb7 100644 --- a/tests/pending/run/reify_newimpl_21.scala +++ b/tests/pending/run/reify_newimpl_21.scala @@ -17,4 +17,4 @@ object Test extends App { } println((new D).code.eval) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_27.scala b/tests/pending/run/reify_newimpl_27.scala index db9ada36e..b9e95f5bd 100644 --- a/tests/pending/run/reify_newimpl_27.scala +++ b/tests/pending/run/reify_newimpl_27.scala @@ -12,4 +12,4 @@ object Test extends App { } C -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_29.scala b/tests/pending/run/reify_newimpl_29.scala index 033c360b8..ad4419bb6 100644 --- a/tests/pending/run/reify_newimpl_29.scala +++ b/tests/pending/run/reify_newimpl_29.scala @@ -12,4 +12,4 @@ object Test extends App { } new C -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_31.scala b/tests/pending/run/reify_newimpl_31.scala index 2e20aa0f6..556617534 100644 --- a/tests/pending/run/reify_newimpl_31.scala +++ b/tests/pending/run/reify_newimpl_31.scala @@ -12,4 +12,4 @@ object Test extends App { } C -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_33.scala b/tests/pending/run/reify_newimpl_33.scala index 98bb2e510..523285445 100644 --- a/tests/pending/run/reify_newimpl_33.scala +++ b/tests/pending/run/reify_newimpl_33.scala @@ -13,4 +13,4 @@ object Test extends App { } C -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_36.scala b/tests/pending/run/reify_newimpl_36.scala index 490e645cf..df4799803 100644 --- a/tests/pending/run/reify_newimpl_36.scala +++ b/tests/pending/run/reify_newimpl_36.scala @@ -12,4 +12,4 @@ object Test extends App { println(code2.eval) } } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_37.scala b/tests/pending/run/reify_newimpl_37.scala index 7c4d4af3d..c8ceba340 100644 --- a/tests/pending/run/reify_newimpl_37.scala +++ b/tests/pending/run/reify_newimpl_37.scala @@ -13,4 +13,4 @@ object Test extends App { println(code3.eval) } } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_38.scala b/tests/pending/run/reify_newimpl_38.scala index fd898b9ab..b3160f018 100644 --- a/tests/pending/run/reify_newimpl_38.scala +++ b/tests/pending/run/reify_newimpl_38.scala @@ -12,4 +12,4 @@ object Test extends App { println(code2.eval) } } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_39.scala b/tests/pending/run/reify_newimpl_39.scala index 885c73827..0568eb482 100644 --- a/tests/pending/run/reify_newimpl_39.scala +++ b/tests/pending/run/reify_newimpl_39.scala @@ -13,4 +13,4 @@ object Test extends App { println(code3.eval) } } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_40.scala b/tests/pending/run/reify_newimpl_40.scala index 018bf720f..0409f71ad 100644 --- a/tests/pending/run/reify_newimpl_40.scala +++ b/tests/pending/run/reify_newimpl_40.scala @@ -13,4 +13,4 @@ object Test extends App { println(code3.eval) } } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_41.scala b/tests/pending/run/reify_newimpl_41.scala index 9bb79fb2b..5eb5e5780 100644 --- a/tests/pending/run/reify_newimpl_41.scala +++ b/tests/pending/run/reify_newimpl_41.scala @@ -15,4 +15,4 @@ object Test extends App { } code.eval } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_42.scala b/tests/pending/run/reify_newimpl_42.scala index bd7deadea..669932e42 100644 --- a/tests/pending/run/reify_newimpl_42.scala +++ b/tests/pending/run/reify_newimpl_42.scala @@ -14,4 +14,4 @@ object Test extends App { } code.eval } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_43.scala b/tests/pending/run/reify_newimpl_43.scala index 88ea22432..823464015 100644 --- a/tests/pending/run/reify_newimpl_43.scala +++ b/tests/pending/run/reify_newimpl_43.scala @@ -13,4 +13,4 @@ object Test extends App { } code.eval } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_44.scala b/tests/pending/run/reify_newimpl_44.scala index 88ea22432..823464015 100644 --- a/tests/pending/run/reify_newimpl_44.scala +++ b/tests/pending/run/reify_newimpl_44.scala @@ -13,4 +13,4 @@ object Test extends App { } code.eval } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_45.scala b/tests/pending/run/reify_newimpl_45.scala index fd8011f46..148c3650a 100644 --- a/tests/pending/run/reify_newimpl_45.scala +++ b/tests/pending/run/reify_newimpl_45.scala @@ -13,4 +13,4 @@ object Test extends App { } new C[String] -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_47.scala b/tests/pending/run/reify_newimpl_47.scala index 8740132f6..b78189399 100644 --- a/tests/pending/run/reify_newimpl_47.scala +++ b/tests/pending/run/reify_newimpl_47.scala @@ -14,4 +14,4 @@ object Test extends App { } println(code.eval) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_48.scala b/tests/pending/run/reify_newimpl_48.scala index 9899bc09a..5ad7eb961 100644 --- a/tests/pending/run/reify_newimpl_48.scala +++ b/tests/pending/run/reify_newimpl_48.scala @@ -19,4 +19,4 @@ object Test extends App { } println(code.eval) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_49.scala b/tests/pending/run/reify_newimpl_49.scala index 2222bd69d..957c5bbde 100644 --- a/tests/pending/run/reify_newimpl_49.scala +++ b/tests/pending/run/reify_newimpl_49.scala @@ -13,4 +13,4 @@ object Test extends App { } code.eval } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_50.scala b/tests/pending/run/reify_newimpl_50.scala index 279cb161a..64d52eb50 100644 --- a/tests/pending/run/reify_newimpl_50.scala +++ b/tests/pending/run/reify_newimpl_50.scala @@ -12,4 +12,4 @@ object Test extends App { } code.eval } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_51.scala b/tests/pending/run/reify_newimpl_51.scala index f823bf403..011d9a6ce 100644 --- a/tests/pending/run/reify_newimpl_51.scala +++ b/tests/pending/run/reify_newimpl_51.scala @@ -15,4 +15,4 @@ object Test extends App { } code.eval } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_newimpl_52.scala b/tests/pending/run/reify_newimpl_52.scala index f01199e83..8b473ffcf 100644 --- a/tests/pending/run/reify_newimpl_52.scala +++ b/tests/pending/run/reify_newimpl_52.scala @@ -15,4 +15,4 @@ object Test extends App { } code.eval } -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_renamed_term_basic.scala b/tests/pending/run/reify_renamed_term_basic.scala index cd76def39..563ce1e8c 100644 --- a/tests/pending/run/reify_renamed_term_basic.scala +++ b/tests/pending/run/reify_renamed_term_basic.scala @@ -17,4 +17,4 @@ object Test extends App { ) println(expr.eval) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_renamed_term_local_to_reifee.scala b/tests/pending/run/reify_renamed_term_local_to_reifee.scala index 1860316a5..44725ff43 100644 --- a/tests/pending/run/reify_renamed_term_local_to_reifee.scala +++ b/tests/pending/run/reify_renamed_term_local_to_reifee.scala @@ -17,4 +17,4 @@ object Test extends App { } println(expr.eval) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_renamed_term_overloaded_method.scala b/tests/pending/run/reify_renamed_term_overloaded_method.scala index 3ef442d20..a93c8f60f 100644 --- a/tests/pending/run/reify_renamed_term_overloaded_method.scala +++ b/tests/pending/run/reify_renamed_term_overloaded_method.scala @@ -14,4 +14,4 @@ object Test extends App { } println(expr.eval) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_renamed_term_t5841.scala b/tests/pending/run/reify_renamed_term_t5841.scala index ef18d650b..551d5afe5 100644 --- a/tests/pending/run/reify_renamed_term_t5841.scala +++ b/tests/pending/run/reify_renamed_term_t5841.scala @@ -4,4 +4,4 @@ import scala.tools.reflect.Eval object Test extends App { println(reify{ru}.eval.getClass) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_renamed_type_basic.scala b/tests/pending/run/reify_renamed_type_basic.scala index 23729e5c5..1666c9687 100644 --- a/tests/pending/run/reify_renamed_type_basic.scala +++ b/tests/pending/run/reify_renamed_type_basic.scala @@ -13,4 +13,4 @@ object Test extends App { } println(expr.eval) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_renamed_type_local_to_reifee.scala b/tests/pending/run/reify_renamed_type_local_to_reifee.scala index ed1bad239..56dfa881c 100644 --- a/tests/pending/run/reify_renamed_type_local_to_reifee.scala +++ b/tests/pending/run/reify_renamed_type_local_to_reifee.scala @@ -21,4 +21,4 @@ object Test extends App { } println(expr.eval) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_renamed_type_spliceable.scala b/tests/pending/run/reify_renamed_type_spliceable.scala index 9c2cff519..73de3cc16 100644 --- a/tests/pending/run/reify_renamed_type_spliceable.scala +++ b/tests/pending/run/reify_renamed_type_spliceable.scala @@ -18,4 +18,4 @@ object Test extends App { }) println(expr.eval) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_sort.scala b/tests/pending/run/reify_sort.scala index 17e3976c0..867f33c33 100644 --- a/tests/pending/run/reify_sort.scala +++ b/tests/pending/run/reify_sort.scala @@ -7,13 +7,13 @@ object Test extends App { * visible in their scope (including local variables or * arguments of enclosing methods). */ - def sort(a: Array[Int]) { + def sort(a: Array[Int]): Unit = { - def swap(i: Int, j: Int) { + def swap(i: Int, j: Int): Unit = { val t = a(i); a(i) = a(j); a(j) = t } - def sort1(l: Int, r: Int) { + def sort1(l: Int, r: Int): Unit = { val pivot = a((l + r) / 2) var i = l var j = r @@ -34,7 +34,7 @@ object Test extends App { sort1(0, a.length - 1) } - def println(ar: Array[Int]) { + def println(ar: Array[Int]): Unit = { def print1 = { def iter(i: Int): String = ar(i) + (if (i < ar.length-1) "," + iter(i+1) else "") @@ -48,4 +48,4 @@ object Test extends App { sort(ar) println(ar) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_sort1.scala b/tests/pending/run/reify_sort1.scala index 6fb3cc589..27bf1ba28 100644 --- a/tests/pending/run/reify_sort1.scala +++ b/tests/pending/run/reify_sort1.scala @@ -18,4 +18,4 @@ object Test extends App { println(xs) println(sort(xs)) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_timeofday.scala b/tests/pending/run/reify_timeofday.scala index efeb81deb..44b428d7c 100644 --- a/tests/pending/run/reify_timeofday.scala +++ b/tests/pending/run/reify_timeofday.scala @@ -39,4 +39,4 @@ object Test extends App { case e: Exception => println("Exception") } }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_typerefs_1a.scala b/tests/pending/run/reify_typerefs_1a.scala index 2e961f171..a4ea4f923 100644 --- a/tests/pending/run/reify_typerefs_1a.scala +++ b/tests/pending/run/reify_typerefs_1a.scala @@ -15,4 +15,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_typerefs_1b.scala b/tests/pending/run/reify_typerefs_1b.scala index 88bb86482..ecc8d2b9b 100644 --- a/tests/pending/run/reify_typerefs_1b.scala +++ b/tests/pending/run/reify_typerefs_1b.scala @@ -15,4 +15,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_typerefs_2a.scala b/tests/pending/run/reify_typerefs_2a.scala index 3a1db1d80..3a3fcc41e 100644 --- a/tests/pending/run/reify_typerefs_2a.scala +++ b/tests/pending/run/reify_typerefs_2a.scala @@ -17,4 +17,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_typerefs_2b.scala b/tests/pending/run/reify_typerefs_2b.scala index 50082aa8d..26c44d03c 100644 --- a/tests/pending/run/reify_typerefs_2b.scala +++ b/tests/pending/run/reify_typerefs_2b.scala @@ -17,4 +17,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_typerefs_3a.scala b/tests/pending/run/reify_typerefs_3a.scala index 682d6f01a..217dab393 100644 --- a/tests/pending/run/reify_typerefs_3a.scala +++ b/tests/pending/run/reify_typerefs_3a.scala @@ -17,4 +17,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_typerefs_3b.scala b/tests/pending/run/reify_typerefs_3b.scala index c85072f55..2967c129f 100644 --- a/tests/pending/run/reify_typerefs_3b.scala +++ b/tests/pending/run/reify_typerefs_3b.scala @@ -17,4 +17,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/reify_varargs.scala b/tests/pending/run/reify_varargs.scala index 1cbc7c947..d157149b4 100644 --- a/tests/pending/run/reify_varargs.scala +++ b/tests/pending/run/reify_varargs.scala @@ -8,4 +8,4 @@ object Test extends App { "Hoth", "the fifth of August", "a disturbance in the Force") println("Message="+msg) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/repl-backticks.scala b/tests/pending/run/repl-backticks.scala index e40a8bc66..37cfaec3e 100644 --- a/tests/pending/run/repl-backticks.scala +++ b/tests/pending/run/repl-backticks.scala @@ -8,7 +8,7 @@ object Test { `yield` """ - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val settings = new Settings() settings.classpath.value = System.getProperty("java.class.path") val repl = new interpreter.IMain(settings) diff --git a/tests/pending/run/retclosure.scala b/tests/pending/run/retclosure.scala index d354cb358..0f4b823c3 100644 --- a/tests/pending/run/retclosure.scala +++ b/tests/pending/run/retclosure.scala @@ -17,7 +17,7 @@ object Test { } } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { Console.println(response) } } diff --git a/tests/pending/run/richs.scala b/tests/pending/run/richs.scala index 4b5345757..ea870b9c4 100644 --- a/tests/pending/run/richs.scala +++ b/tests/pending/run/richs.scala @@ -16,7 +16,7 @@ trait RichTest { def run: Unit } object RichCharTest1 extends RichTest { - def run { + def run: Unit = { println("\n" + getObjectName + ":") println('\40'.isWhitespace) println('\011'.isWhitespace) @@ -45,7 +45,7 @@ object RichCharTest1 extends RichTest { object RichIntTest extends RichTest { private val n = 10 private val m = -2 - def run { + def run: Unit = { println("\n" + getObjectName + ":") println(length(0 until n)) println(length(0 to n)) @@ -63,7 +63,7 @@ object RichIntTest extends RichTest { } } object RichStringTest1 extends RichTest { - def run { + def run: Unit = { println("\n" + getObjectName + ":") println("s1: " + s1) println("s2: " + s2) @@ -73,7 +73,7 @@ object RichStringTest1 extends RichTest { } } object RichStringTest2 extends RichTest { - def run { + def run: Unit = { println("\n" + getObjectName + ":") Console.print("s1: "); s1.lines foreach println Console.print("s2: "); s2.lines foreach println @@ -83,7 +83,7 @@ object RichStringTest2 extends RichTest { } } object RichStringTest3 extends RichTest { - def run { + def run: Unit = { println("\n" + getObjectName + ":") println("s1: " + s1.stripLineEnd) println("s2: " + s2.stripLineEnd) @@ -93,7 +93,7 @@ object RichStringTest3 extends RichTest { } } object RichStringTest4 extends RichTest { - def run { + def run: Unit = { println("\n" + getObjectName + ":") println("s1: " + s1.stripMargin) println("s2: " + s2.stripMargin) @@ -103,7 +103,7 @@ object RichStringTest4 extends RichTest { } } object RichStringTest5 extends RichTest { - def run { + def run: Unit = { println("\n" + getObjectName + ":") println("s1: " + s3.stripMargin('#')) println("s2: " + s3.stripMargin('#')) @@ -113,7 +113,7 @@ object RichStringTest5 extends RichTest { } } object RichStringTest6 extends RichTest { - def run { + def run: Unit = { println("a:b:c:d".split(':').toList) println("a.b.c.d".split('.').toList) println("a$b$c$d".split('$').toList) @@ -125,7 +125,7 @@ object RichStringTest6 extends RichTest { } /** xxx */ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { RichCharTest1.run //RichCharTest2.run RichIntTest.run diff --git a/tests/pending/run/runtime-richChar.scala b/tests/pending/run/runtime-richChar.scala index dceb70e74..72e25a3a8 100644 --- a/tests/pending/run/runtime-richChar.scala +++ b/tests/pending/run/runtime-richChar.scala @@ -1,5 +1,5 @@ object Test extends App { - def testSeq(name: String, expected: Seq[Char], got: Seq[Char]) { + def testSeq(name: String, expected: Seq[Char], got: Seq[Char]): Unit = { if (expected.toList == got.toList) println(name + " ok") else diff --git a/tests/pending/run/runtimeEval1.scala b/tests/pending/run/runtimeEval1.scala index 9497b5291..84861c6c8 100644 --- a/tests/pending/run/runtimeEval1.scala +++ b/tests/pending/run/runtimeEval1.scala @@ -6,4 +6,4 @@ object Test extends App { val x = 2 println(x) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/runtimeEval2.scala b/tests/pending/run/runtimeEval2.scala index 513b82012..a566487c5 100644 --- a/tests/pending/run/runtimeEval2.scala +++ b/tests/pending/run/runtimeEval2.scala @@ -8,4 +8,4 @@ object Test extends App { val x = 2 val outer = reify{reify{x}} println(outer.eval.eval) -}
\ No newline at end of file +} diff --git a/tests/pending/run/scan.scala b/tests/pending/run/scan.scala index 47e0a7d97..a43da3387 100644 --- a/tests/pending/run/scan.scala +++ b/tests/pending/run/scan.scala @@ -4,7 +4,7 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val lst = List(1, 2, 3, 4, 5) assert(lst.scanLeft(0)(_ + _) == List(0, 1, 3, 6, 10, 15)) @@ -20,4 +20,4 @@ object Test { assert(Stream.from(1).scanLeft(0)(_ + _).take(5) == Stream(0, 1, 3, 6, 10)) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/sequenceComparisons.scala b/tests/pending/run/sequenceComparisons.scala index 613b37f45..27d995477 100644 --- a/tests/pending/run/sequenceComparisons.scala +++ b/tests/pending/run/sequenceComparisons.scala @@ -89,7 +89,7 @@ object Test { val failures = new mutable.ListBuffer[String] var testCount = 0 - def assertOne(op1: Any, op2: Any, res: Boolean, str: String) { + def assertOne(op1: Any, op2: Any, res: Boolean, str: String): Unit = { testCount += 1 val resStr = str.format(op1, op2) // println(resStr) @@ -113,7 +113,7 @@ object Test { } } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { runSeqs() assert(failures.isEmpty, failures mkString "\n") diff --git a/tests/pending/run/serialize-stream.scala b/tests/pending/run/serialize-stream.scala index 3ab9f2df3..fc84d610a 100644 --- a/tests/pending/run/serialize-stream.scala +++ b/tests/pending/run/serialize-stream.scala @@ -1,7 +1,7 @@ object Test { - def ser[T](s: Stream[T]) { + def ser[T](s: Stream[T]): Unit = { val bos = new java.io.ByteArrayOutputStream() val oos = new java.io.ObjectOutputStream(bos) oos.writeObject(s) @@ -12,7 +12,7 @@ object Test { println(obj.asInstanceOf[Seq[T]].toList) } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { ser(Stream(1, 2, 3)) ser(Stream(1)) ser(Stream()) diff --git a/tests/pending/run/showraw_aliases.scala b/tests/pending/run/showraw_aliases.scala index 56bd13707..b78a72b2e 100644 --- a/tests/pending/run/showraw_aliases.scala +++ b/tests/pending/run/showraw_aliases.scala @@ -14,4 +14,4 @@ object Test extends App { def stabilize(s: String) = stabilizePositions(stabilizeIds(s)) println(stabilize(showRaw(ttree))) println(stabilize(showRaw(ttree, printIds = true))) -}
\ No newline at end of file +} diff --git a/tests/pending/run/showraw_mods.scala b/tests/pending/run/showraw_mods.scala index a10e4821d..77d80f57f 100644 --- a/tests/pending/run/showraw_mods.scala +++ b/tests/pending/run/showraw_mods.scala @@ -3,4 +3,4 @@ import scala.reflect.runtime.universe._ object Test extends App { val tree = reify{trait C { private[this] val x = 2; var y = x; lazy val z = y }} println(showRaw(tree.tree)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/showraw_nosymbol.scala b/tests/pending/run/showraw_nosymbol.scala index fbdc1591c..d7f3f7c25 100644 --- a/tests/pending/run/showraw_nosymbol.scala +++ b/tests/pending/run/showraw_nosymbol.scala @@ -2,4 +2,4 @@ import scala.reflect.runtime.universe._ object Test extends App { println(showRaw(NoSymbol)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/showraw_tree.scala b/tests/pending/run/showraw_tree.scala index 3624a24d6..8f3999a35 100644 --- a/tests/pending/run/showraw_tree.scala +++ b/tests/pending/run/showraw_tree.scala @@ -5,4 +5,4 @@ object Test extends App { val tree2 = reify(new collection.mutable.HashMap[String, String]) println(showRaw(tree1.tree)) println(showRaw(tree2.tree)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/showraw_tree_ids.scala b/tests/pending/run/showraw_tree_ids.scala index ea9a3cd4c..8b44a8875 100644 --- a/tests/pending/run/showraw_tree_ids.scala +++ b/tests/pending/run/showraw_tree_ids.scala @@ -6,4 +6,4 @@ object Test extends App { def stabilize(s: String) = """#\d+""".r.replaceAllIn(s, "#<id>") println(stabilize(showRaw(tree1.tree, printIds = true))) println(stabilize(showRaw(tree2.tree, printIds = true))) -}
\ No newline at end of file +} diff --git a/tests/pending/run/showraw_tree_kinds.scala b/tests/pending/run/showraw_tree_kinds.scala index 0ca5a387d..bfb0094f5 100644 --- a/tests/pending/run/showraw_tree_kinds.scala +++ b/tests/pending/run/showraw_tree_kinds.scala @@ -5,4 +5,4 @@ object Test extends App { val tree2 = reify(new collection.mutable.HashMap[String, String]) println(showRaw(tree1.tree, printKinds = true)) println(showRaw(tree2.tree, printKinds = true)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/showraw_tree_types_ids.scala b/tests/pending/run/showraw_tree_types_ids.scala index 883af0110..5d60d9049 100644 --- a/tests/pending/run/showraw_tree_types_ids.scala +++ b/tests/pending/run/showraw_tree_types_ids.scala @@ -8,4 +8,4 @@ object Test extends App { def stabilize(s: String) = """#\d+""".r.replaceAllIn(s, "#<id>") println(stabilize(showRaw(tb.typecheck(tree1.tree), printIds = true, printTypes = true))) println(stabilize(showRaw(tb.typecheck(tree2.tree), printIds = true, printTypes = true))) -}
\ No newline at end of file +} diff --git a/tests/pending/run/showraw_tree_types_typed.scala b/tests/pending/run/showraw_tree_types_typed.scala index 3dd696c77..6d52a23b0 100644 --- a/tests/pending/run/showraw_tree_types_typed.scala +++ b/tests/pending/run/showraw_tree_types_typed.scala @@ -7,4 +7,4 @@ object Test extends App { val tree2 = reify(new collection.mutable.HashMap[String, String]) println(showRaw(tb.typecheck(tree1.tree), printTypes = true)) println(showRaw(tb.typecheck(tree2.tree), printTypes = true)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/showraw_tree_types_untyped.scala b/tests/pending/run/showraw_tree_types_untyped.scala index 4df2eb66b..5feea3e62 100644 --- a/tests/pending/run/showraw_tree_types_untyped.scala +++ b/tests/pending/run/showraw_tree_types_untyped.scala @@ -5,4 +5,4 @@ object Test extends App { val tree2 = reify(new collection.mutable.HashMap[String, String]) println(showRaw(tree1.tree, printTypes = true)) println(showRaw(tree2.tree, printTypes = true)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/showraw_tree_ultimate.scala b/tests/pending/run/showraw_tree_ultimate.scala index e0d36e6bb..5d39f176c 100644 --- a/tests/pending/run/showraw_tree_ultimate.scala +++ b/tests/pending/run/showraw_tree_ultimate.scala @@ -8,4 +8,4 @@ object Test extends App { def stabilize(s: String) = """#\d+""".r.replaceAllIn(s, "#<id>") println(stabilize(showRaw(tb.typecheck(tree1.tree), printIds = true, printKinds = true, printTypes = true))) println(stabilize(showRaw(tb.typecheck(tree2.tree), printIds = true, printKinds = true, printTypes = true))) -}
\ No newline at end of file +} diff --git a/tests/pending/run/shutdownhooks.scala b/tests/pending/run/shutdownhooks.scala index 7fe5d129d..5f512a391 100644 --- a/tests/pending/run/shutdownhooks.scala +++ b/tests/pending/run/shutdownhooks.scala @@ -6,7 +6,7 @@ object Test { def daemon() = { val t = new Thread { - override def run() { + override def run(): Unit = { Thread.sleep(10000) println("Hallelujah!") // should not see this } @@ -18,7 +18,7 @@ object Test { def nonDaemon() = { val t = new Thread { - override def run() { + override def run(): Unit = { Thread.sleep(100) println("Fooblitzky!") } diff --git a/tests/pending/run/static-module-method.scala b/tests/pending/run/static-module-method.scala index a8691300d..3e3b3cc07 100644 --- a/tests/pending/run/static-module-method.scala +++ b/tests/pending/run/static-module-method.scala @@ -8,7 +8,7 @@ object Test { def map(x: String, f: String => String) = f(x) - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println(map("hello", Test.moduleMethod)) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/stream-stack-overflow-filter-map.scala b/tests/pending/run/stream-stack-overflow-filter-map.scala index f3a9dd49c..bde7aea61 100644 --- a/tests/pending/run/stream-stack-overflow-filter-map.scala +++ b/tests/pending/run/stream-stack-overflow-filter-map.scala @@ -4,7 +4,7 @@ object Test extends App { def mapSucc[Repr, That](s: FilterMonadic[Int, Repr])(implicit cbf: CanBuildFrom[Repr, Int, That]) = s map (_ + 1) def flatMapId[T, Repr, That](s: FilterMonadic[T, Repr])(implicit cbf: CanBuildFrom[Repr, T, That]) = s flatMap (Seq(_)) - def testStreamPred(s: Stream[Int])(p: Int => Boolean) { + def testStreamPred(s: Stream[Int])(p: Int => Boolean): Unit = { val res1 = s withFilter p val res2 = s filter p @@ -23,7 +23,7 @@ object Test extends App { assert((res1 map identity).toSeq == res2.toSeq) } - def testStream(s: Stream[Int]) { + def testStream(s: Stream[Int]): Unit = { testStreamPred(s)(_ => false) testStreamPred(s)(_ => true) testStreamPred(s)(_ % 2 == 0) diff --git a/tests/pending/run/string-extractor.scala b/tests/pending/run/string-extractor.scala index c0fe911ff..7ab2c2eaa 100644 --- a/tests/pending/run/string-extractor.scala +++ b/tests/pending/run/string-extractor.scala @@ -34,14 +34,14 @@ object TripleBippy { object Test { def f(x: Any) = x match { - case Bippy('B' | 'b', 'O' | 'o', 'B' | 'b', xs @ _*) => xs + case Bippy('B' | 'b', 'O' | 'o', 'B' | 'b', xs : _*) => xs case _ => "nope" } def g(x: Any): String = x match { - case TripleBippy(3 :: Nil, 3.0, 'b', chars @ _*) => "1: " + chars - case TripleBippy(5 :: Nil, 5.0, 'b' | 'B', chars @ _*) => "2: " + chars - case TripleBippy(_, _, chars @ _*) => "3: " + chars + case TripleBippy(3 :: Nil, 3.0, 'b', chars : _*) => "1: " + chars + case TripleBippy(5 :: Nil, 5.0, 'b' | 'B', chars : _*) => "2: " + chars + case TripleBippy(_, _, chars : _*) => "3: " + chars case _ => "nope" } diff --git a/tests/pending/run/stringinterpolation_macro-run.scala b/tests/pending/run/stringinterpolation_macro-run.scala index e18375d52..886fe16e3 100644 --- a/tests/pending/run/stringinterpolation_macro-run.scala +++ b/tests/pending/run/stringinterpolation_macro-run.scala @@ -17,7 +17,7 @@ println(f"${true}%B") println(f"${new java.lang.Boolean(false)}%B") println(f"${new java.lang.Boolean(true)}%B") -implicit val stringToBoolean = java.lang.Boolean.parseBoolean(_: String) +implicit val stringToBoolean: String => Boolean = java.lang.Boolean.parseBoolean(_: String) println(f"${"true"}%b") println(f"${"false"}%b") @@ -55,7 +55,7 @@ println(f"${(120:Byte) : java.lang.Byte}%c") println(f"${(120:Short) : java.lang.Short}%c") println(f"${120 : java.lang.Integer}%c") -implicit val stringToChar = (x: String) => x(0) +implicit val stringToChar: String => Char = (x: String) => x(0) println(f"${"Scala"}%c") // 'd' | 'o' | 'x' | 'X' (category: integral) @@ -82,9 +82,9 @@ locally { } { - implicit val strToShort = (s: String) => java.lang.Short.parseShort(s) + implicit val strToShort: String => Short = (s: String) => java.lang.Short.parseShort(s) println(f"${"120"}%d") - implicit val strToInt = (s: String) => 42 + implicit val strToInt: String => Int = (s: String) => 42 println(f"${"120"}%d") } @@ -109,7 +109,7 @@ println(f"${c}%TD") println(f"${c.getTime}%TD") println(f"${c.getTime.getTime}%TD") -implicit val strToDate = (x: String) => c +implicit val strToDate: String => java.util.Calendar = (x: String) => c println(f"""${"1234"}%TD""") diff --git a/tests/pending/run/structural.scala b/tests/pending/run/structural.scala index 7da104ca6..f14086cc4 100644 --- a/tests/pending/run/structural.scala +++ b/tests/pending/run/structural.scala @@ -69,7 +69,7 @@ object test1 { val y: Tata } - def l (r: rt) { + def l (r: rt): Unit = { println(" 1. " + r.c) println(" 2. " + r.a + 1) println(" 3. " + r.d(o1)) @@ -102,15 +102,15 @@ object test1 { println("30. " + r.e(r.x)) // static error }*/ - def mb(r: Object { def e[T](x: T): T }) { + def mb(r: Object { def e[T](x: T): T }): Unit = { println("31. " + r.e[Int](4)) // while this is ok } - def m1(r: Object { def z(x: Tata): Unit }) { + def m1(r: Object { def z(x: Tata): Unit }): Unit = { println("32. " + r.z(new Titi)) // while this is ok } - def m2[T](r: Object { def e(x: Tata): T; val x: Tata }) { + def m2[T](r: Object { def e(x: Tata): T; val x: Tata }): Unit = { println("33. " + r.e(r.x)) // and this too } @@ -118,7 +118,7 @@ object test1 { def e(x: T): T = x } - def m3[T](r: Rec3[T], x: T) { + def m3[T](r: Rec3[T], x: T): Unit = { println("33. " + r.e(x)) // and this too } @@ -132,24 +132,24 @@ object test1 { } object test2 { - class C extends { def f() { println("1") } } + class C extends { def f(): Unit = { println("1") } } val x1 = new C x1.f() - abstract class D extends { def f() } - val x2 = new D { def f() { println("2") } } + abstract class D extends { def f(): Unit } + val x2 = new D { def f(): Unit = { println("2") } } x2.f() - val x3 = new { def f() { println("3") } } - def run(x: { def f() }) { x.f() } + val x3 = new { def f(): Unit = { println("3") } } + def run(x: { def f(): Unit }): Unit = { x.f() } run(x3) - type T = { def f() } - val x4 = new AnyRef { def f() { println("4") } } // ok! + type T = { def f(): Unit } + val x4 = new AnyRef { def f(): Unit = { println("4") } } // ok! //val x4 = new T { def f() { println("4") } } // error! (bug #1241) x4.f() - val x5: T = new { def f() { println("5") } } + val x5: T = new { def f(): Unit = { println("5") } } x5.f() } diff --git a/tests/pending/run/synchronized.scala b/tests/pending/run/synchronized.scala index 1f0e32992..d5f6d8651 100644 --- a/tests/pending/run/synchronized.scala +++ b/tests/pending/run/synchronized.scala @@ -289,7 +289,7 @@ class C2 extends T object O2 extends T object Test extends App { - def check(name: String, result: Boolean) { + def check(name: String, result: Boolean): Unit = { println("%-10s %s" format (name +":", if (result) "OK" else "FAILED")) } @@ -446,4 +446,4 @@ object Test extends App { check("O2.O.gv", O2.O.gv()) check("O2.O.gf", O2.O.gf) // check("O2.O.gl", O2.O.gl) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t0005.scala b/tests/pending/run/t0005.scala index 9c86e8c55..38c24745f 100644 --- a/tests/pending/run/t0005.scala +++ b/tests/pending/run/t0005.scala @@ -11,7 +11,7 @@ object B1 { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { import B1.B2.q val res = 5 match { case q(x) => x } println(res) diff --git a/tests/pending/run/t0048.scala b/tests/pending/run/t0048.scala index 9ee3453cd..c1fcc6ddc 100644 --- a/tests/pending/run/t0048.scala +++ b/tests/pending/run/t0048.scala @@ -5,7 +5,7 @@ object A1 { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val q = new A1.A2.X val res = 5 match { case q(x) => x } println(res) diff --git a/tests/pending/run/t0325.scala b/tests/pending/run/t0325.scala index a126a3a20..ea6180306 100644 --- a/tests/pending/run/t0325.scala +++ b/tests/pending/run/t0325.scala @@ -16,7 +16,7 @@ case class RS(self: String) { object Test { def expect = List("a","b") - def test(f: => Array[String], which: String) { + def test(f: => Array[String], which: String): Unit = { try { val ret = f.toList if (ret != expect) @@ -28,7 +28,7 @@ object Test { } } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val badChars = "?*{+([\\^.$" for (c <- badChars) diff --git a/tests/pending/run/t0421-new.scala b/tests/pending/run/t0421-new.scala index 8df5aa199..f743470a3 100644 --- a/tests/pending/run/t0421-new.scala +++ b/tests/pending/run/t0421-new.scala @@ -29,4 +29,4 @@ object Test extends App { println(matmul(Array(Array(2, 3)), Array(Array(5), Array(7))).deep.mkString("[", ",", "]")) println(matmul(Array(Array(4)), Array(Array(6, 8))).deep.mkString("[", ",", "]")) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t0432.scala b/tests/pending/run/t0432.scala index b860a0874..10f64e31d 100644 --- a/tests/pending/run/t0432.scala +++ b/tests/pending/run/t0432.scala @@ -12,7 +12,7 @@ object Test { val s = new StringValue("hei") - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { m(s) } } diff --git a/tests/pending/run/t0528.scala b/tests/pending/run/t0528.scala index 68a997517..53136178a 100644 --- a/tests/pending/run/t0528.scala +++ b/tests/pending/run/t0528.scala @@ -1,7 +1,7 @@ import scala.language.{ existentials } trait Sequ[A] { - def toArray: Array[T forSome {type T <: A}] + def toArray: Array[T forSome { type T <: A }] } class RichStr extends Sequ[Char] { diff --git a/tests/pending/run/t0677-new.scala b/tests/pending/run/t0677-new.scala index 15c8b4aa1..e1e2cefc9 100644 --- a/tests/pending/run/t0677-new.scala +++ b/tests/pending/run/t0677-new.scala @@ -7,4 +7,4 @@ object Test extends App { val x = new X[String] x.a(1)(2) = "hello" assert(x.a(1)(2) == "hello") -}
\ No newline at end of file +} diff --git a/tests/pending/run/t0911.scala b/tests/pending/run/t0911.scala index be8c5de1d..c895b53b5 100644 --- a/tests/pending/run/t0911.scala +++ b/tests/pending/run/t0911.scala @@ -1,8 +1,11 @@ class Foo(val bar : () => String); -class IP extends { - val baz = "bar"; -} with Foo(() => baz); +class IP extends Foo(() => baz) { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val baz = "bar" +// END copied early initializers +}; object Test extends App{ (new IP).bar(); diff --git a/tests/pending/run/t107.scala b/tests/pending/run/t107.scala index ab1b28988..2cd4c9820 100644 --- a/tests/pending/run/t107.scala +++ b/tests/pending/run/t107.scala @@ -5,4 +5,4 @@ object Test { hash += bytes(0) Console.println(hash) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t1192.scala b/tests/pending/run/t1192.scala index 3222bb0a3..cdff7ef72 100644 --- a/tests/pending/run/t1192.scala +++ b/tests/pending/run/t1192.scala @@ -1,6 +1,6 @@ object Test extends App { val v1: Array[Array[Int]] = Array(Array(1, 2), Array(3, 4)) - def f[T](w: Array[Array[T]]) { + def f[T](w: Array[Array[T]]): Unit = { for (r <- w) println(r.deep.toString) } f(v1) diff --git a/tests/pending/run/t1247.scala b/tests/pending/run/t1247.scala index c709b73bc..9a511c25d 100644 --- a/tests/pending/run/t1247.scala +++ b/tests/pending/run/t1247.scala @@ -1,6 +1,6 @@ object Test extends App { val f = () => 5 - def test(g: => Int) { + def test(g: => Int): Unit = { val gFunc = g _ val isSameClosureClass = gFunc.getClass == f.getClass val isSame = gFunc eq f diff --git a/tests/pending/run/t1360.scala b/tests/pending/run/t1360.scala index 470312766..959c1cd2f 100644 --- a/tests/pending/run/t1360.scala +++ b/tests/pending/run/t1360.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val seq: Seq[String] = List("one", "two") println(java.util.Arrays.asList(seq: _*)) println(java.util.Arrays.asList(Seq(1,2,3): _*)) diff --git a/tests/pending/run/t1427.scala b/tests/pending/run/t1427.scala index 4b8057ffe..4784fad8b 100644 --- a/tests/pending/run/t1427.scala +++ b/tests/pending/run/t1427.scala @@ -3,7 +3,7 @@ import scala.language.{ higherKinds } class Bob[K[_]] { def foo(other: Any) = other match { - case x: (Bob[X] forSome { type X[_] }) => true + case x: (Bob[_[_] <: Any]) => true case _ => false } } diff --git a/tests/pending/run/t1500.scala b/tests/pending/run/t1500.scala index 30c026f70..743a92167 100644 --- a/tests/pending/run/t1500.scala +++ b/tests/pending/run/t1500.scala @@ -16,7 +16,7 @@ object Test { """ - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val settings = new Settings() settings.classpath.value = System.getProperty("java.class.path") diff --git a/tests/pending/run/t1501.scala b/tests/pending/run/t1501.scala index ca6bf357f..7a9a695d8 100644 --- a/tests/pending/run/t1501.scala +++ b/tests/pending/run/t1501.scala @@ -27,7 +27,7 @@ object Test { """ - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val settings = new Settings() settings.classpath.value = System.getProperty("java.class.path") val tool = new interpreter.IMain(settings) diff --git a/tests/pending/run/t1503.scala b/tests/pending/run/t1503.scala index 1be0e74ac..25e163d90 100644 --- a/tests/pending/run/t1503.scala +++ b/tests/pending/run/t1503.scala @@ -17,4 +17,4 @@ object Test extends App { } catch { case _: ClassCastException => println("whoops") } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t1503_future.scala b/tests/pending/run/t1503_future.scala index 1e3daad76..2e7d55e2e 100644 --- a/tests/pending/run/t1503_future.scala +++ b/tests/pending/run/t1503_future.scala @@ -14,4 +14,4 @@ object Test extends App { assert(matchWhateverCCE(1) == 1) assert(matchWhateverCCE("1") == "1") -}
\ No newline at end of file +} diff --git a/tests/pending/run/t1672.scala b/tests/pending/run/t1672.scala index ee025b903..510530ab4 100644 --- a/tests/pending/run/t1672.scala +++ b/tests/pending/run/t1672.scala @@ -20,7 +20,7 @@ object Test { } } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { assert(bar(2) == 0) assert(nestedTry1(2) == 0) diff --git a/tests/pending/run/t1697.scala b/tests/pending/run/t1697.scala index 01590dd40..39dcdd732 100644 --- a/tests/pending/run/t1697.scala +++ b/tests/pending/run/t1697.scala @@ -7,7 +7,7 @@ object Value { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val term = Add(Num(1), Add(Num(2), Num(3))) val res = term match { case Add(Num(x), Num(y)) => "Add(Num, Num)" diff --git a/tests/pending/run/t1747.scala b/tests/pending/run/t1747.scala index b11af6c02..4bf583c18 100644 --- a/tests/pending/run/t1747.scala +++ b/tests/pending/run/t1747.scala @@ -1,5 +1,5 @@ object Foo extends Foo { - def f {} + def f: Unit = {} } class Foo diff --git a/tests/pending/run/t1829.scala b/tests/pending/run/t1829.scala index 824052742..b51055a5a 100644 --- a/tests/pending/run/t1829.scala +++ b/tests/pending/run/t1829.scala @@ -1,5 +1,5 @@ object Test{ - def main(args : Array[String]){ + def main(args : Array[String]): Unit = { import scala.collection.immutable._ assert(IntMap.empty == HashMap.empty); assert(HashMap.empty == IntMap.empty); diff --git a/tests/pending/run/t1987.scala b/tests/pending/run/t1987.scala index de869edea..f5abc262c 100644 --- a/tests/pending/run/t1987.scala +++ b/tests/pending/run/t1987.scala @@ -11,7 +11,7 @@ package foo { } package bar { object Main { - def main(args:Array[String]) { + def main(args:Array[String]): Unit = { duh(33L) bip.bar.duh(33L) duh(33d) @@ -39,7 +39,7 @@ package bip { package object bar extends Duh with Duh2 { } package bar { object Main { - def main(args:Array[String]) { + def main(args:Array[String]): Unit = { duh(33L) bip.bar.duh(33L) duh(33d) diff --git a/tests/pending/run/t2005.scala b/tests/pending/run/t2005.scala index 45da9fe5b..342a4dad0 100644 --- a/tests/pending/run/t2005.scala +++ b/tests/pending/run/t2005.scala @@ -1,9 +1,9 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val a = Array.ofDim[Int](2,2) test(a) } - def test[A](t: Array[Array[A]]) { + def test[A](t: Array[Array[A]]): Unit = { val tmp = t(0) t(1) = tmp } diff --git a/tests/pending/run/t2027.scala b/tests/pending/run/t2027.scala index ee9bd3886..96012d90f 100644 --- a/tests/pending/run/t2027.scala +++ b/tests/pending/run/t2027.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { def fibs: Stream[Int] = Stream.cons(0, Stream.cons(1, fibs.zip(fibs.tail).map(p => p._1 + p._2))) println(fibs(2)) // stack overflow } diff --git a/tests/pending/run/t2029.scala b/tests/pending/run/t2029.scala index 32b04f0b4..d4ab0f02b 100644 --- a/tests/pending/run/t2029.scala +++ b/tests/pending/run/t2029.scala @@ -1,5 +1,5 @@ object Test{ - def main(args : Array[String]){ + def main(args : Array[String]): Unit = { import scala.collection.immutable.TreeSet; val mainSet = TreeSet(1 to 5 :_*) diff --git a/tests/pending/run/t2127.scala b/tests/pending/run/t2127.scala index 869d8a38d..d913ca1d1 100755 --- a/tests/pending/run/t2127.scala +++ b/tests/pending/run/t2127.scala @@ -9,7 +9,7 @@ abstract class Bar(val ctor : (Int) => Test) object Test extends Bar(new Test(_)) { //<--- ILLEGAL ACCESS - def main(args: Array[String]){} + def main(args: Array[String]): Unit = {} } //however the following is legal: diff --git a/tests/pending/run/t2162.scala b/tests/pending/run/t2162.scala index fe576a8e2..c2b6600eb 100644 --- a/tests/pending/run/t2162.scala +++ b/tests/pending/run/t2162.scala @@ -2,17 +2,17 @@ class Foo(x: Int) class Bar extends Foo(1) trait A { - def foo[T <: Foo] + def foo[T <: Foo]: Unit } class B extends A { - def foo[Bar] { println("B.foo[Bar]") } + def foo[Bar]: Unit = { println("B.foo[Bar]") } } object Test { val x = new B val y = new A { - def foo[Bar] { println("A.foo[Bar]") } + def foo[Bar]: Unit = { println("A.foo[Bar]") } } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { x.foo // ok y.foo // java.lang.AssertionError: assertion failed (Erasure.scala:441 in r18338)) } diff --git a/tests/pending/run/t2212.scala b/tests/pending/run/t2212.scala index b9c0cd776..78fbfbe25 100644 --- a/tests/pending/run/t2212.scala +++ b/tests/pending/run/t2212.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { import collection.mutable._ val x4 = LinkedList[Int](1) println(x4) diff --git a/tests/pending/run/t2236-new.scala b/tests/pending/run/t2236-new.scala index 26d694562..c50e85633 100644 --- a/tests/pending/run/t2236-new.scala +++ b/tests/pending/run/t2236-new.scala @@ -12,8 +12,8 @@ object EvidenceTest { trait A[T] { implicit val e: E[T] = null } class B[T : E] extends A[T] { override val e = null } - def f[T] { + def f[T]: Unit = { implicit val e: E[T] = null new B[T]{} } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t2236-old.scala b/tests/pending/run/t2236-old.scala index 64ed18c80..0c6f82813 100644 --- a/tests/pending/run/t2236-old.scala +++ b/tests/pending/run/t2236-old.scala @@ -10,7 +10,7 @@ object EvidenceTest { trait A[T] { implicit val e: E[T] = null } class B[T : E] extends A[T] { override val e = null } - def f[T] { + def f[T]: Unit = { implicit val e: E[T] = null new B[T]{} } diff --git a/tests/pending/run/t2316_run.scala b/tests/pending/run/t2316_run.scala index a3d5bf890..a2adad415 100644 --- a/tests/pending/run/t2316_run.scala +++ b/tests/pending/run/t2316_run.scala @@ -1,7 +1,7 @@ case class T1(source: String) object T1 { - implicit def T1FromT2(implicit t2: T2) = new T1(t2.source) + implicit def T1FromT2(implicit t2: T2): T1 = new T1(t2.source) } case class T2(source: String) @@ -10,13 +10,13 @@ object A { def requireT1(implicit t1: T1) = t1 object B1 { - implicit val t2_b1 = new T2("from B1") + implicit val t2_b1: T2 = new T2("from B1") requireT1 } object B2 { def t1 = { - implicit val t2_b2 = new T2("from B2") + implicit val t2_b2: T2 = new T2("from B2") // Implicits.cacheResult returns T1.T1FromT2(t2_b1) here, which is bogus. Even though T1.T1FromT2 was found // outside of the scope of A.B1, this implicit expression should _not_ be cached, as it includes the bound // variable t2_b1 from this scope. @@ -26,7 +26,7 @@ object A { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { assert(A.B2.t1.source == "from B2") } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t2318.scala b/tests/pending/run/t2318.scala index b638c433f..90059799e 100644 --- a/tests/pending/run/t2318.scala +++ b/tests/pending/run/t2318.scala @@ -31,7 +31,7 @@ object Test { structural.bar } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { // figuring this will otherwise break on windows try t1() catch { case _: java.io.IOException => () } diff --git a/tests/pending/run/t2333.scala b/tests/pending/run/t2333.scala index 7dc7a92df..de405a8ed 100644 --- a/tests/pending/run/t2333.scala +++ b/tests/pending/run/t2333.scala @@ -1,5 +1,5 @@ class A { - def whatever() { + def whatever(): Unit = { lazy val a = 1 lazy val b = try { 2 } catch { case _: Throwable => 0 } a @@ -9,7 +9,7 @@ class A { } object Test { - def main(a: Array[String]) { + def main(a: Array[String]): Unit = { val a = new A a.whatever } diff --git a/tests/pending/run/t2417.scala b/tests/pending/run/t2417.scala index 8d1527e2d..80105f72b 100644 --- a/tests/pending/run/t2417.scala +++ b/tests/pending/run/t2417.scala @@ -1,10 +1,10 @@ // #2417 object Test { - def parallel(numThreads: Int)(block: => Unit) { + def parallel(numThreads: Int)(block: => Unit): Unit = { var failure: Throwable = null val threads = Array.tabulate(numThreads)(i => new Thread { - override def run { + override def run: Unit = { try { block } catch { @@ -17,7 +17,7 @@ object Test { if (failure != null) println("FAILURE: " + failure) } - def testSet(initialSize: Int, numThreads: Int, passes: Int) { + def testSet(initialSize: Int, numThreads: Int, passes: Int): Unit = { val orig = Set.empty ++ (1 to initialSize) parallel(numThreads) { for (pass <- 0 until passes) { @@ -33,7 +33,7 @@ object Test { } } - def testMap(initialSize: Int, numThreads: Int, passes: Int) { + def testMap(initialSize: Int, numThreads: Int, passes: Int): Unit = { val orig = Map.empty ++ ((1 to initialSize) map ((_,"v"))) parallel(numThreads) { for (pass <- 0 until passes) { @@ -49,7 +49,7 @@ object Test { } } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println("testing small Map that doesn't promote to HashMap...") testMap(4, 2, 1000000) println() diff --git a/tests/pending/run/t2514.scala b/tests/pending/run/t2514.scala index 0bf716e8b..89ee0b86e 100644 --- a/tests/pending/run/t2514.scala +++ b/tests/pending/run/t2514.scala @@ -4,7 +4,7 @@ import scala.language.{ implicitConversions, postfixOps, reflectiveCalls } object Test { - implicit def x[A](a: A) = new { def xx = a } + implicit def x[A](a: A): AnyRef{def xx: A} = new { def xx = a } def main(args: Array[String]): Unit = { val r1 = 12 xx; diff --git a/tests/pending/run/t2524.scala b/tests/pending/run/t2524.scala index 552663e9e..e806b8c35 100644 --- a/tests/pending/run/t2524.scala +++ b/tests/pending/run/t2524.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val m = new collection.mutable.HashMap[String, String] { override def initialSize = 0 } diff --git a/tests/pending/run/t2526.scala b/tests/pending/run/t2526.scala index 53f305913..4d567bbbf 100644 --- a/tests/pending/run/t2526.scala +++ b/tests/pending/run/t2526.scala @@ -5,7 +5,7 @@ object Test { import collection._ - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val m = new mutable.HashMap[String, String] /* Use non hash-based structure for verification */ diff --git a/tests/pending/run/t2594_tcpoly.scala b/tests/pending/run/t2594_tcpoly.scala index a9d26693f..789833bc0 100644 --- a/tests/pending/run/t2594_tcpoly.scala +++ b/tests/pending/run/t2594_tcpoly.scala @@ -17,5 +17,5 @@ object Test { def foo[A](a: Bar[X, A]) = a } - def main(as: Array[String]) { BarMonad[Int] foo (new Bar[Int, Int]) } + def main(as: Array[String]): Unit = { BarMonad[Int] foo (new Bar[Int, Int]) } } diff --git a/tests/pending/run/t261.scala b/tests/pending/run/t261.scala index d8ddb28c0..4e1aa9ff9 100644 --- a/tests/pending/run/t261.scala +++ b/tests/pending/run/t261.scala @@ -8,4 +8,4 @@ object Test extends A with B { println(foo) f } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t266.scala b/tests/pending/run/t266.scala index 20a29dabb..ea5f63c29 100644 --- a/tests/pending/run/t266.scala +++ b/tests/pending/run/t266.scala @@ -20,4 +20,4 @@ object Pip trait P { self: Pip.type => Nil foreach identity -}
\ No newline at end of file +} diff --git a/tests/pending/run/t2754.scala b/tests/pending/run/t2754.scala index aeb5259da..8817b62c7 100644 --- a/tests/pending/run/t2754.scala +++ b/tests/pending/run/t2754.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val v: FooBarPlus[Int] = new FooBarPlusImpl() v.foo += 10 } @@ -17,8 +17,8 @@ trait FooBarPlus[P] extends FooBar[P] { override def foo: P override def bar: P - def foo_=(x: P) - def bar_=(x: P) + def foo_=(x: P): Unit + def bar_=(x: P): Unit } class FooImpl extends Foo[Int] { @@ -34,6 +34,6 @@ class FooBarImpl extends FooImpl with FooBar[Int] { } class FooBarPlusImpl extends FooBarImpl with FooBarPlus[Int] { - def foo_=(x: Int) { f = x } - def bar_=(x: Int) { b = x } + def foo_=(x: Int): Unit = { f = x } + def bar_=(x: Int): Unit = { b = x } } diff --git a/tests/pending/run/t2800.scala b/tests/pending/run/t2800.scala index 84d1de050..0d2893842 100644 --- a/tests/pending/run/t2800.scala +++ b/tests/pending/run/t2800.scala @@ -1,13 +1,13 @@ object Test { - def f1 = ("": Any) match { case List(x @ _*) => x ; case _ => false } - def f2 = (5: Any) match { case List(x @ _*) => x ; case _ => false } - def f3 = (Nil: Any) match { case List(x @ _*) => x ; case _ => false } - def f4 = (Array(1): Any) match { case List(x @ _*) => x ; case _ => false } + def f1 = ("": Any) match { case List(x : _*) => x ; case _ => false } + def f2 = (5: Any) match { case List(x : _*) => x ; case _ => false } + def f3 = (Nil: Any) match { case List(x : _*) => x ; case _ => false } + def f4 = (Array(1): Any) match { case List(x : _*) => x ; case _ => false } - def f5 = ("": Any) match { case Array(x @ _*) => x ; case _ => false } - def f6 = (5: Any) match { case Array(x @ _*) => x ; case _ => false } - def f7 = (Nil: Any) match { case Array(x @ _*) => x ; case _ => false } - def f8 = (Array(1): Any) match { case Array(x @ _*) => x ; case _ => false } + def f5 = ("": Any) match { case Array(x : _*) => x ; case _ => false } + def f6 = (5: Any) match { case Array(x : _*) => x ; case _ => false } + def f7 = (Nil: Any) match { case Array(x : _*) => x ; case _ => false } + def f8 = (Array(1): Any) match { case Array(x : _*) => x ; case _ => false } def f9 = ("": Any) match { case x @ List(_*) => x ; case _ => false } def f10 = ("": Any) match { case List(_*) => true ; case _ => false } diff --git a/tests/pending/run/t2813.2.scala b/tests/pending/run/t2813.2.scala index f41f6451f..db9299c40 100644 --- a/tests/pending/run/t2813.2.scala +++ b/tests/pending/run/t2813.2.scala @@ -2,31 +2,31 @@ import java.util.LinkedList import collection.JavaConversions._ object Test extends App { - def assertListEquals[A](expected: List[A], actual: Seq[A]) { + def assertListEquals[A](expected: List[A], actual: Seq[A]): Unit = { assert(expected.sameElements(actual), "Expected list to contain " + expected.mkString("[", ", ", "]") + ", but was " + actual.mkString("[", ", ", "]")) } - def addAllOfNonCollectionWrapperAtZeroOnEmptyLinkedList() { + def addAllOfNonCollectionWrapperAtZeroOnEmptyLinkedList(): Unit = { val l = new LinkedList[Int] l.addAll(0, List(1, 2)) assertListEquals(List(1, 2), l) } - def addAllOfNonCollectionWrapperAtZeroOnLinkedList() { + def addAllOfNonCollectionWrapperAtZeroOnLinkedList(): Unit = { val l = new LinkedList[Int] += 1 += 2 l.addAll(0, List(10, 11)) assertListEquals((List(10, 11, 1, 2)), l) } - def addAllOfCollectionWrapperAtZeroOnLinkedList() { + def addAllOfCollectionWrapperAtZeroOnLinkedList(): Unit = { val l = new LinkedList[Int] += 1 += 2 l.addAll(0, new LinkedList[Int] += 10 += 11) assertListEquals((List(10, 11, 1, 2)), l) } - def addAllOfCollectionWrapperAtZeroOnEmptyLinkedList() { + def addAllOfCollectionWrapperAtZeroOnEmptyLinkedList(): Unit = { val l = new LinkedList[Int] l.addAll(0, new LinkedList[Int] += 10 += 11) assertListEquals((List(10, 11)), l) diff --git a/tests/pending/run/t2849.scala b/tests/pending/run/t2849.scala index cadf605ae..bfc2135da 100644 --- a/tests/pending/run/t2849.scala +++ b/tests/pending/run/t2849.scala @@ -3,7 +3,7 @@ import scala.collection.immutable.TreeSet object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { ticketExample similarExample } @@ -14,7 +14,7 @@ object Test { val N = if (totalMBytes > 1000) 10000 else 4000 val M = N / 10 - def ticketExample { + def ticketExample: Unit = { var big = 100000 var aSortedSet: SortedSet[Int] = TreeSet(big) @@ -29,7 +29,7 @@ object Test { } } - def similarExample { + def similarExample: Unit = { var big = 100 var aSortedSet: SortedSet[Int] = TreeSet(big) diff --git a/tests/pending/run/t2886.scala b/tests/pending/run/t2886.scala index b919f1377..44783a5d8 100644 --- a/tests/pending/run/t2886.scala +++ b/tests/pending/run/t2886.scala @@ -6,4 +6,4 @@ object Test { val tree = reify((x:String) => test(address=x,name=x)).tree println(tree) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t2958.scala b/tests/pending/run/t2958.scala index dcd24ecc3..cf4867ab5 100644 --- a/tests/pending/run/t2958.scala +++ b/tests/pending/run/t2958.scala @@ -10,7 +10,7 @@ object Test { "default" } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { assert(f(Array("1", "2")) == "12") } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t3038c/B_2.scala b/tests/pending/run/t3038c/B_2.scala index 81f3f8d48..d5b7baa1c 100644 --- a/tests/pending/run/t3038c/B_2.scala +++ b/tests/pending/run/t3038c/B_2.scala @@ -18,7 +18,7 @@ class B extends A { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new B().run } } diff --git a/tests/pending/run/t3038d.scala b/tests/pending/run/t3038d.scala index 44fb047b0..3dab07675 100644 --- a/tests/pending/run/t3038d.scala +++ b/tests/pending/run/t3038d.scala @@ -2,14 +2,14 @@ trait Foo { @transient protected var load = 1 @transient protected var a = 12 - protected def init[B](in: java.io.ObjectInputStream) { + protected def init[B](in: java.io.ObjectInputStream): Unit = { in.defaultReadObject load = in.readInt val sizea = in.readInt a = 12 } - protected def serializeTo(out: java.io.ObjectOutputStream) { + protected def serializeTo(out: java.io.ObjectOutputStream): Unit = { out.defaultWriteObject out.writeInt(load) out.writeInt(a) @@ -21,13 +21,13 @@ class Bar extends Foo with Serializable { def size = a @transient var second: Any = null - def checkMember { if (first == null) print("") } + def checkMember: Unit = { if (first == null) print("") } - private def writeObject(out: java.io.ObjectOutputStream) { + private def writeObject(out: java.io.ObjectOutputStream): Unit = { serializeTo(out) } - private def readObject(in: java.io.ObjectInputStream) { + private def readObject(in: java.io.ObjectInputStream): Unit = { first = null init(in) } @@ -48,7 +48,7 @@ object Test { } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val a1 = new Bar() val serialized:Array[Byte] = toBytes(a1) val deserialized: Bar = toObject(serialized) diff --git a/tests/pending/run/t3112.scala b/tests/pending/run/t3112.scala index eb8eec632..44aa9471d 100644 --- a/tests/pending/run/t3112.scala +++ b/tests/pending/run/t3112.scala @@ -8,4 +8,4 @@ object Test { println((Vector() ++ (0 until 33)) takeRight 0) // error } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t3158.scala b/tests/pending/run/t3158.scala index c824b62e9..b9304ee44 100644 --- a/tests/pending/run/t3158.scala +++ b/tests/pending/run/t3158.scala @@ -1,9 +1,9 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println(args.map(_ => foo _).deep) } - def foo(xs: String*) { + def foo(xs: String*): Unit = { println(xs) } } diff --git a/tests/pending/run/t3199b.scala b/tests/pending/run/t3199b.scala index 5010f2b08..8052ef996 100644 --- a/tests/pending/run/t3199b.scala +++ b/tests/pending/run/t3199b.scala @@ -4,7 +4,7 @@ object Test { java.util.Arrays.asList(Array(1,2,3):_*) } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println(test()) } diff --git a/tests/pending/run/t3235-minimal.scala b/tests/pending/run/t3235-minimal.scala index dc9907b63..91eb78219 100644 --- a/tests/pending/run/t3235-minimal.scala +++ b/tests/pending/run/t3235-minimal.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { assert(123456789.round == 123456789) assert(math.round(123456789) == 123456789) assert(1234567890123456789L.round == 1234567890123456789L) diff --git a/tests/pending/run/t3242.scala b/tests/pending/run/t3242.scala index 0a449d51f..6a8ecd7a2 100644 --- a/tests/pending/run/t3242.scala +++ b/tests/pending/run/t3242.scala @@ -3,7 +3,7 @@ import scala.language.{ higherKinds } object Test { - def benchmarkA(num: Int) { + def benchmarkA(num: Int): Unit = { type A = Int diff --git a/tests/pending/run/t3326.scala b/tests/pending/run/t3326.scala index 4ac7ef913..5e403794d 100644 --- a/tests/pending/run/t3326.scala +++ b/tests/pending/run/t3326.scala @@ -25,12 +25,12 @@ import scala.math.Ordering */ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { testCollectionSorted() testImmutableSorted() } - def testCollectionSorted() { + def testCollectionSorted(): Unit = { import collection._ val order = implicitly[Ordering[Int]].reverse var m1: SortedMap[Int, String] = SortedMap.empty[Int, String](order) @@ -51,7 +51,7 @@ object Test { println(m1 + (3 -> "?")) } - def testImmutableSorted() { + def testImmutableSorted(): Unit = { import collection.immutable._ val order = implicitly[Ordering[Int]].reverse var m1: SortedMap[Int, String] = SortedMap.empty[Int, String](order) diff --git a/tests/pending/run/t3327.scala b/tests/pending/run/t3327.scala index 7e6d3fc21..9274841d0 100644 --- a/tests/pending/run/t3327.scala +++ b/tests/pending/run/t3327.scala @@ -1,8 +1,8 @@ object Test { - def main (args : Array[String]) { + def main (args : Array[String]): Unit = { val b = new StringBuilder b.append ("Hello World!") b.lastIndexOf ('e') println (b.toString) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t3346a.scala b/tests/pending/run/t3346a.scala index c0a90b011..c3d9598ca 100644 --- a/tests/pending/run/t3346a.scala +++ b/tests/pending/run/t3346a.scala @@ -8,4 +8,4 @@ object Test extends App { val a: Rep[Int] = new Rep(42) println(a.foo) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t3346d.scala b/tests/pending/run/t3346d.scala index 3f7989621..2d82a45ab 100644 --- a/tests/pending/run/t3346d.scala +++ b/tests/pending/run/t3346d.scala @@ -11,11 +11,11 @@ object Test extends App { def create(v: A): Basket[A,B] } - implicit val bf = new BasketFactory[Int,TARInt] { + implicit val bf: Test.BasketFactory[Int,Test.TARInt] = new BasketFactory[Int,TARInt] { def create(v: Int): Basket[Int,TARInt] = new Basket[Int, TARInt]{} } implicit def i2[A,B](a: A)(implicit bf: BasketFactory[A,B]): Basket[A,B] = bf.create(a) 1.iAmABasket // <-- i2 conversion not applicable -}
\ No newline at end of file +} diff --git a/tests/pending/run/t3346e.scala b/tests/pending/run/t3346e.scala index ac0de564d..e74f29f89 100644 --- a/tests/pending/run/t3346e.scala +++ b/tests/pending/run/t3346e.scala @@ -48,9 +48,9 @@ class FilterMapFixed[A, Repr <% TraversableLike[A, Repr]](a: Repr) { } object MyEnhancements { - implicit def toQS[Coll](a: Coll) = new QuickSort(a) - implicit def toFM[Coll](a: Coll) = new FilterMap(a) - implicit def toFM2[A, Repr <% TraversableLike[A, Repr]](a: Repr) = new FilterMapFixed(a) + implicit def toQS[Coll](a: Coll): QuickSort[Coll] = new QuickSort(a) + implicit def toFM[Coll](a: Coll): FilterMap[Coll] = new FilterMap(a) + implicit def toFM2[A, Repr <% TraversableLike[A, Repr]](a: Repr): FilterMapFixed[A,Repr] = new FilterMapFixed(a) } object Test extends App { diff --git a/tests/pending/run/t3346f.scala b/tests/pending/run/t3346f.scala index 4799ca2ca..b2dc16de5 100644 --- a/tests/pending/run/t3346f.scala +++ b/tests/pending/run/t3346f.scala @@ -4,11 +4,11 @@ import scala.language.reflectiveCalls object Test extends App { trait Foo[A] implicit def fooString: Foo[String] = null - implicit def value[A](implicit foo: Foo[A]) = 5 + implicit def value[A](implicit foo: Foo[A]): Int = 5 println(implicitly[Int]) - implicit def conversion[A](x: Int)(implicit foo: Foo[A]) = new { + implicit def conversion[A](x: Int)(implicit foo: Foo[A]): AnyRef{def aMethod: Int} = new { def aMethod = 5 } println(1.aMethod) diff --git a/tests/pending/run/t3346g.scala b/tests/pending/run/t3346g.scala index d7c9d79c7..fd90322da 100644 --- a/tests/pending/run/t3346g.scala +++ b/tests/pending/run/t3346g.scala @@ -6,4 +6,4 @@ object Test extends App { implicit def s2i(s: String): Int = s.length implicit def toA[T](t: T)(implicit f: T => Int): A = A(f(t), t.toString) println("asdf".copy(b = 3)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t3346h.scala b/tests/pending/run/t3346h.scala index 97ebc9380..49f672d34 100644 --- a/tests/pending/run/t3346h.scala +++ b/tests/pending/run/t3346h.scala @@ -3,7 +3,7 @@ import scala.language.implicitConversions object Test extends App { trait Fundep[T, U] { def u(t: T): U } class C { def y = "x" } - implicit val FundepStringC = new Fundep[String, C]{ def u(t: String) = new C } + implicit val FundepStringC: Test.Fundep[String,Test.C] = new Fundep[String, C]{ def u(t: String) = new C } implicit def foo[T, U](x: T)(implicit y: Fundep[T, U]): U = y.u(x) println("x".y) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t3346j.scala b/tests/pending/run/t3346j.scala index 98b5a870a..bfacb6d0e 100644 --- a/tests/pending/run/t3346j.scala +++ b/tests/pending/run/t3346j.scala @@ -5,7 +5,7 @@ import scala.reflect.runtime.universe._ object Test extends App { class A[T] class B[T] - implicit def foo[T: TypeTag](a: A[T])(implicit b: B[T]) = new { def baz = typeOf[T] } + implicit def foo[T: TypeTag](a: A[T])(implicit b: B[T]): AnyRef{def baz: reflect.runtime.universe.Type} = new { def baz = typeOf[T] } implicit def bar[T <: Int]: B[T] = new B[T]() println(new A[Int]().baz) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t3361.scala b/tests/pending/run/t3361.scala index d49bcbc90..25e095476 100644 --- a/tests/pending/run/t3361.scala +++ b/tests/pending/run/t3361.scala @@ -11,33 +11,33 @@ object Test extends App { append_1 append_2 - def empty { + def empty: Unit = { val none = DoubleLinkedList() require(none.size == 0) none.foreach( _ => require(false)) } - def builder_1 { + def builder_1: Unit = { val ten = DoubleLinkedList(1 to 10: _*) require(10 == ten.size) } - def builder_2 { + def builder_2: Unit = { val ten = DoubleLinkedList(1 to 10: _*) require((ten.size*(ten.size+1))/2 == ten.reduceLeft(_ + _)) } - def chaining_1 { + def chaining_1: Unit = { val ten = DoubleLinkedList(1 to 10: _*) require(ten.reverse == DoubleLinkedList((1 to 10).reverse: _*)) } - def chaining_2 { + def chaining_2: Unit = { val ten = DoubleLinkedList(1 to 10: _*) require(ten == ten.reverse.reverse) } - def insert_1 { + def insert_1: Unit = { val ten = DoubleLinkedList(1 to 10: _*) ten.append(DoubleLinkedList(11)) @@ -51,7 +51,7 @@ object Test extends App { require(ten.last == 11) } - def insert_2 { + def insert_2: Unit = { val ten = DoubleLinkedList(1 to 10: _*) try { DoubleLinkedList().insert(ten) @@ -66,7 +66,7 @@ object Test extends App { require(zero.last == 10) } - def append_1 { + def append_1: Unit = { val ten = DoubleLinkedList(1 to 10: _*) val eleven = ten.append(DoubleLinkedList(11)) // Post-append equality test @@ -81,7 +81,7 @@ object Test extends App { require(ten.last == 11) } - def append_2 { + def append_2: Unit = { val ten = DoubleLinkedList(1 to 10: _*) try { DoubleLinkedList().append(ten) diff --git a/tests/pending/run/t3395.scala b/tests/pending/run/t3395.scala index b4990a171..5f663d68f 100644 --- a/tests/pending/run/t3395.scala +++ b/tests/pending/run/t3395.scala @@ -10,4 +10,4 @@ object Test { case Seq(_, _, x) => println(x) } } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t3425b/Generated_2.scala b/tests/pending/run/t3425b/Generated_2.scala index d08f17e8b..8fa810416 100644 --- a/tests/pending/run/t3425b/Generated_2.scala +++ b/tests/pending/run/t3425b/Generated_2.scala @@ -3,7 +3,7 @@ import scala.language._ object Test { def whatis[T: TypeTag](x: T) = typeOf[T] - def sshow(label: String, xs: Traversable[Any]) { + def sshow(label: String, xs: Traversable[Any]): Unit = { println("==== " + label + " ====\n") xs.toList.map("" + _).sorted foreach println println("\n") @@ -13,434 +13,690 @@ object Test { type R2_0 = R1_0 { val y: (P) with (P) } type R1_1 = ( Any { val y: P }) with ( Any { val y: Q }) type R2_1 = R1_1 { val y: (P) with (Q) } - type R1_2 = ( Any { val y: P }) with ( Any { val y: R forSome { type R <: P with Q } }) - type R2_2 = R1_2 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_2 = ( Any { val y: P }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_2 = R1_2 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_3 = ( Any { val y: P }) with ( A { val y: P }) type R2_3 = R1_3 { val y: (P) with (P) } type R1_4 = ( Any { val y: P }) with ( A { val y: Q }) type R2_4 = R1_4 { val y: (P) with (Q) } - type R1_5 = ( Any { val y: P }) with ( A { val y: R forSome { type R <: P with Q } }) - type R2_5 = R1_5 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_5 = ( Any { val y: P }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_5 = R1_5 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_6 = ( Any { val y: P }) with ( B { val y: P }) type R2_6 = R1_6 { val y: (P) with (P) } type R1_7 = ( Any { val y: P }) with ( B { val y: Q }) type R2_7 = R1_7 { val y: (P) with (Q) } - type R1_8 = ( Any { val y: P }) with ( B { val y: R forSome { type R <: P with Q } }) - type R2_8 = R1_8 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_8 = ( Any { val y: P }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_8 = R1_8 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_9 = ( Any { val y: P }) with ( C { val y: P }) type R2_9 = R1_9 { val y: (P) with (P) } type R1_10 = ( Any { val y: P }) with ( C { val y: Q }) type R2_10 = R1_10 { val y: (P) with (Q) } - type R1_11 = ( Any { val y: P }) with ( C { val y: R forSome { type R <: P with Q } }) - type R2_11 = R1_11 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_11 = ( Any { val y: P }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_11 = R1_11 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_12 = ( Any { val y: Q }) with ( Any { val y: P }) type R2_12 = R1_12 { val y: (Q) with (P) } type R1_13 = ( Any { val y: Q }) with ( Any { val y: Q }) type R2_13 = R1_13 { val y: (Q) with (Q) } - type R1_14 = ( Any { val y: Q }) with ( Any { val y: R forSome { type R <: P with Q } }) - type R2_14 = R1_14 { val y: (Q) with (R forSome { type R <: P with Q }) } + type R1_14 = ( Any { val y: Q }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_14 = R1_14 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } type R1_15 = ( Any { val y: Q }) with ( A { val y: P }) type R2_15 = R1_15 { val y: (Q) with (P) } type R1_16 = ( Any { val y: Q }) with ( A { val y: Q }) type R2_16 = R1_16 { val y: (Q) with (Q) } - type R1_17 = ( Any { val y: Q }) with ( A { val y: R forSome { type R <: P with Q } }) - type R2_17 = R1_17 { val y: (Q) with (R forSome { type R <: P with Q }) } + type R1_17 = ( Any { val y: Q }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_17 = R1_17 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } type R1_18 = ( Any { val y: Q }) with ( B { val y: P }) type R2_18 = R1_18 { val y: (Q) with (P) } type R1_19 = ( Any { val y: Q }) with ( B { val y: Q }) type R2_19 = R1_19 { val y: (Q) with (Q) } - type R1_20 = ( Any { val y: Q }) with ( B { val y: R forSome { type R <: P with Q } }) - type R2_20 = R1_20 { val y: (Q) with (R forSome { type R <: P with Q }) } + type R1_20 = ( Any { val y: Q }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_20 = R1_20 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } type R1_21 = ( Any { val y: Q }) with ( C { val y: P }) type R2_21 = R1_21 { val y: (Q) with (P) } type R1_22 = ( Any { val y: Q }) with ( C { val y: Q }) type R2_22 = R1_22 { val y: (Q) with (Q) } - type R1_23 = ( Any { val y: Q }) with ( C { val y: R forSome { type R <: P with Q } }) - type R2_23 = R1_23 { val y: (Q) with (R forSome { type R <: P with Q }) } - type R1_24 = ( Any { val y: R forSome { type R <: P with Q } }) with ( Any { val y: P }) - type R2_24 = R1_24 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_25 = ( Any { val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q }) - type R2_25 = R1_25 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_26 = ( Any { val y: R forSome { type R <: P with Q } }) with ( Any { val y: R forSome { type R <: P with Q } }) - type R2_26 = R1_26 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } - type R1_27 = ( Any { val y: R forSome { type R <: P with Q } }) with ( A { val y: P }) - type R2_27 = R1_27 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_28 = ( Any { val y: R forSome { type R <: P with Q } }) with ( A { val y: Q }) - type R2_28 = R1_28 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_29 = ( Any { val y: R forSome { type R <: P with Q } }) with ( A { val y: R forSome { type R <: P with Q } }) - type R2_29 = R1_29 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } - type R1_30 = ( Any { val y: R forSome { type R <: P with Q } }) with ( B { val y: P }) - type R2_30 = R1_30 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_31 = ( Any { val y: R forSome { type R <: P with Q } }) with ( B { val y: Q }) - type R2_31 = R1_31 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_32 = ( Any { val y: R forSome { type R <: P with Q } }) with ( B { val y: R forSome { type R <: P with Q } }) - type R2_32 = R1_32 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } - type R1_33 = ( Any { val y: R forSome { type R <: P with Q } }) with ( C { val y: P }) - type R2_33 = R1_33 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_34 = ( Any { val y: R forSome { type R <: P with Q } }) with ( C { val y: Q }) - type R2_34 = R1_34 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_35 = ( Any { val y: R forSome { type R <: P with Q } }) with ( C { val y: R forSome { type R <: P with Q } }) - type R2_35 = R1_35 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } + type R1_23 = ( Any { val y: Q }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_23 = R1_23 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } + type R1_24 = ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: P }) + type R2_24 = R1_24 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_25 = ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q }) + type R2_25 = R1_25 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_26 = ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_26 = R1_26 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } + type R1_27 = ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: P }) + type R2_27 = R1_27 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_28 = ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: Q }) + type R2_28 = R1_28 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_29 = ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_29 = R1_29 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } + type R1_30 = ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: P }) + type R2_30 = R1_30 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_31 = ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: Q }) + type R2_31 = R1_31 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_32 = ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_32 = R1_32 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } + type R1_33 = ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: P }) + type R2_33 = R1_33 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_34 = ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: Q }) + type R2_34 = R1_34 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_35 = ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_35 = R1_35 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } type R1_36 = ( A { val y: P }) with ( Any { val y: P }) type R2_36 = R1_36 { val y: (P) with (P) } type R1_37 = ( A { val y: P }) with ( Any { val y: Q }) type R2_37 = R1_37 { val y: (P) with (Q) } - type R1_38 = ( A { val y: P }) with ( Any { val y: R forSome { type R <: P with Q } }) - type R2_38 = R1_38 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_38 = ( A { val y: P }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_38 = R1_38 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_39 = ( A { val y: P }) with ( A { val y: P }) type R2_39 = R1_39 { val y: (P) with (P) } type R1_40 = ( A { val y: P }) with ( A { val y: Q }) type R2_40 = R1_40 { val y: (P) with (Q) } - type R1_41 = ( A { val y: P }) with ( A { val y: R forSome { type R <: P with Q } }) - type R2_41 = R1_41 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_41 = ( A { val y: P }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_41 = R1_41 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_42 = ( A { val y: P }) with ( B { val y: P }) type R2_42 = R1_42 { val y: (P) with (P) } type R1_43 = ( A { val y: P }) with ( B { val y: Q }) type R2_43 = R1_43 { val y: (P) with (Q) } - type R1_44 = ( A { val y: P }) with ( B { val y: R forSome { type R <: P with Q } }) - type R2_44 = R1_44 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_44 = ( A { val y: P }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_44 = R1_44 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_45 = ( A { val y: P }) with ( C { val y: P }) type R2_45 = R1_45 { val y: (P) with (P) } type R1_46 = ( A { val y: P }) with ( C { val y: Q }) type R2_46 = R1_46 { val y: (P) with (Q) } - type R1_47 = ( A { val y: P }) with ( C { val y: R forSome { type R <: P with Q } }) - type R2_47 = R1_47 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_47 = ( A { val y: P }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_47 = R1_47 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_48 = ( A { val y: Q }) with ( Any { val y: P }) type R2_48 = R1_48 { val y: (Q) with (P) } type R1_49 = ( A { val y: Q }) with ( Any { val y: Q }) type R2_49 = R1_49 { val y: (Q) with (Q) } - type R1_50 = ( A { val y: Q }) with ( Any { val y: R forSome { type R <: P with Q } }) - type R2_50 = R1_50 { val y: (Q) with (R forSome { type R <: P with Q }) } + type R1_50 = ( A { val y: Q }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_50 = R1_50 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } type R1_51 = ( A { val y: Q }) with ( A { val y: P }) type R2_51 = R1_51 { val y: (Q) with (P) } type R1_52 = ( A { val y: Q }) with ( A { val y: Q }) type R2_52 = R1_52 { val y: (Q) with (Q) } - type R1_53 = ( A { val y: Q }) with ( A { val y: R forSome { type R <: P with Q } }) - type R2_53 = R1_53 { val y: (Q) with (R forSome { type R <: P with Q }) } + type R1_53 = ( A { val y: Q }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_53 = R1_53 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } type R1_54 = ( A { val y: Q }) with ( B { val y: P }) type R2_54 = R1_54 { val y: (Q) with (P) } type R1_55 = ( A { val y: Q }) with ( B { val y: Q }) type R2_55 = R1_55 { val y: (Q) with (Q) } - type R1_56 = ( A { val y: Q }) with ( B { val y: R forSome { type R <: P with Q } }) - type R2_56 = R1_56 { val y: (Q) with (R forSome { type R <: P with Q }) } + type R1_56 = ( A { val y: Q }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_56 = R1_56 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } type R1_57 = ( A { val y: Q }) with ( C { val y: P }) type R2_57 = R1_57 { val y: (Q) with (P) } type R1_58 = ( A { val y: Q }) with ( C { val y: Q }) type R2_58 = R1_58 { val y: (Q) with (Q) } - type R1_59 = ( A { val y: Q }) with ( C { val y: R forSome { type R <: P with Q } }) - type R2_59 = R1_59 { val y: (Q) with (R forSome { type R <: P with Q }) } - type R1_60 = ( A { val y: R forSome { type R <: P with Q } }) with ( Any { val y: P }) - type R2_60 = R1_60 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_61 = ( A { val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q }) - type R2_61 = R1_61 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_62 = ( A { val y: R forSome { type R <: P with Q } }) with ( Any { val y: R forSome { type R <: P with Q } }) - type R2_62 = R1_62 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } - type R1_63 = ( A { val y: R forSome { type R <: P with Q } }) with ( A { val y: P }) - type R2_63 = R1_63 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_64 = ( A { val y: R forSome { type R <: P with Q } }) with ( A { val y: Q }) - type R2_64 = R1_64 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_65 = ( A { val y: R forSome { type R <: P with Q } }) with ( A { val y: R forSome { type R <: P with Q } }) - type R2_65 = R1_65 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } - type R1_66 = ( A { val y: R forSome { type R <: P with Q } }) with ( B { val y: P }) - type R2_66 = R1_66 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_67 = ( A { val y: R forSome { type R <: P with Q } }) with ( B { val y: Q }) - type R2_67 = R1_67 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_68 = ( A { val y: R forSome { type R <: P with Q } }) with ( B { val y: R forSome { type R <: P with Q } }) - type R2_68 = R1_68 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } - type R1_69 = ( A { val y: R forSome { type R <: P with Q } }) with ( C { val y: P }) - type R2_69 = R1_69 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_70 = ( A { val y: R forSome { type R <: P with Q } }) with ( C { val y: Q }) - type R2_70 = R1_70 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_71 = ( A { val y: R forSome { type R <: P with Q } }) with ( C { val y: R forSome { type R <: P with Q } }) - type R2_71 = R1_71 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } + type R1_59 = ( A { val y: Q }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_59 = R1_59 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } + type R1_60 = ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: P }) + type R2_60 = R1_60 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_61 = ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q }) + type R2_61 = R1_61 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_62 = ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_62 = R1_62 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } + type R1_63 = ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: P }) + type R2_63 = R1_63 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_64 = ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: Q }) + type R2_64 = R1_64 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_65 = ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_65 = R1_65 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } + type R1_66 = ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: P }) + type R2_66 = R1_66 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_67 = ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: Q }) + type R2_67 = R1_67 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_68 = ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_68 = R1_68 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } + type R1_69 = ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: P }) + type R2_69 = R1_69 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_70 = ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: Q }) + type R2_70 = R1_70 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_71 = ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_71 = R1_71 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } type R1_72 = ( B { val y: P }) with ( Any { val y: P }) type R2_72 = R1_72 { val y: (P) with (P) } type R1_73 = ( B { val y: P }) with ( Any { val y: Q }) type R2_73 = R1_73 { val y: (P) with (Q) } - type R1_74 = ( B { val y: P }) with ( Any { val y: R forSome { type R <: P with Q } }) - type R2_74 = R1_74 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_74 = ( B { val y: P }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_74 = R1_74 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_75 = ( B { val y: P }) with ( A { val y: P }) type R2_75 = R1_75 { val y: (P) with (P) } type R1_76 = ( B { val y: P }) with ( A { val y: Q }) type R2_76 = R1_76 { val y: (P) with (Q) } - type R1_77 = ( B { val y: P }) with ( A { val y: R forSome { type R <: P with Q } }) - type R2_77 = R1_77 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_77 = ( B { val y: P }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_77 = R1_77 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_78 = ( B { val y: P }) with ( B { val y: P }) type R2_78 = R1_78 { val y: (P) with (P) } type R1_79 = ( B { val y: P }) with ( B { val y: Q }) type R2_79 = R1_79 { val y: (P) with (Q) } - type R1_80 = ( B { val y: P }) with ( B { val y: R forSome { type R <: P with Q } }) - type R2_80 = R1_80 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_80 = ( B { val y: P }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_80 = R1_80 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_81 = ( B { val y: P }) with ( C { val y: P }) type R2_81 = R1_81 { val y: (P) with (P) } type R1_82 = ( B { val y: P }) with ( C { val y: Q }) type R2_82 = R1_82 { val y: (P) with (Q) } - type R1_83 = ( B { val y: P }) with ( C { val y: R forSome { type R <: P with Q } }) - type R2_83 = R1_83 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_83 = ( B { val y: P }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_83 = R1_83 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_84 = ( B { val y: Q }) with ( Any { val y: P }) type R2_84 = R1_84 { val y: (Q) with (P) } type R1_85 = ( B { val y: Q }) with ( Any { val y: Q }) type R2_85 = R1_85 { val y: (Q) with (Q) } - type R1_86 = ( B { val y: Q }) with ( Any { val y: R forSome { type R <: P with Q } }) - type R2_86 = R1_86 { val y: (Q) with (R forSome { type R <: P with Q }) } + type R1_86 = ( B { val y: Q }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_86 = R1_86 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } type R1_87 = ( B { val y: Q }) with ( A { val y: P }) type R2_87 = R1_87 { val y: (Q) with (P) } type R1_88 = ( B { val y: Q }) with ( A { val y: Q }) type R2_88 = R1_88 { val y: (Q) with (Q) } - type R1_89 = ( B { val y: Q }) with ( A { val y: R forSome { type R <: P with Q } }) - type R2_89 = R1_89 { val y: (Q) with (R forSome { type R <: P with Q }) } + type R1_89 = ( B { val y: Q }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_89 = R1_89 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } type R1_90 = ( B { val y: Q }) with ( B { val y: P }) type R2_90 = R1_90 { val y: (Q) with (P) } type R1_91 = ( B { val y: Q }) with ( B { val y: Q }) type R2_91 = R1_91 { val y: (Q) with (Q) } - type R1_92 = ( B { val y: Q }) with ( B { val y: R forSome { type R <: P with Q } }) - type R2_92 = R1_92 { val y: (Q) with (R forSome { type R <: P with Q }) } + type R1_92 = ( B { val y: Q }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_92 = R1_92 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } type R1_93 = ( B { val y: Q }) with ( C { val y: P }) type R2_93 = R1_93 { val y: (Q) with (P) } type R1_94 = ( B { val y: Q }) with ( C { val y: Q }) type R2_94 = R1_94 { val y: (Q) with (Q) } - type R1_95 = ( B { val y: Q }) with ( C { val y: R forSome { type R <: P with Q } }) - type R2_95 = R1_95 { val y: (Q) with (R forSome { type R <: P with Q }) } - type R1_96 = ( B { val y: R forSome { type R <: P with Q } }) with ( Any { val y: P }) - type R2_96 = R1_96 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_97 = ( B { val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q }) - type R2_97 = R1_97 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_98 = ( B { val y: R forSome { type R <: P with Q } }) with ( Any { val y: R forSome { type R <: P with Q } }) - type R2_98 = R1_98 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } - type R1_99 = ( B { val y: R forSome { type R <: P with Q } }) with ( A { val y: P }) - type R2_99 = R1_99 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_100 = ( B { val y: R forSome { type R <: P with Q } }) with ( A { val y: Q }) - type R2_100 = R1_100 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_101 = ( B { val y: R forSome { type R <: P with Q } }) with ( A { val y: R forSome { type R <: P with Q } }) - type R2_101 = R1_101 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } - type R1_102 = ( B { val y: R forSome { type R <: P with Q } }) with ( B { val y: P }) - type R2_102 = R1_102 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_103 = ( B { val y: R forSome { type R <: P with Q } }) with ( B { val y: Q }) - type R2_103 = R1_103 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_104 = ( B { val y: R forSome { type R <: P with Q } }) with ( B { val y: R forSome { type R <: P with Q } }) - type R2_104 = R1_104 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } - type R1_105 = ( B { val y: R forSome { type R <: P with Q } }) with ( C { val y: P }) - type R2_105 = R1_105 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_106 = ( B { val y: R forSome { type R <: P with Q } }) with ( C { val y: Q }) - type R2_106 = R1_106 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_107 = ( B { val y: R forSome { type R <: P with Q } }) with ( C { val y: R forSome { type R <: P with Q } }) - type R2_107 = R1_107 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } + type R1_95 = ( B { val y: Q }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_95 = R1_95 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } + type R1_96 = ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: P }) + type R2_96 = R1_96 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_97 = ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q }) + type R2_97 = R1_97 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_98 = ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_98 = R1_98 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } + type R1_99 = ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: P }) + type R2_99 = R1_99 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_100 = ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: Q }) + type R2_100 = R1_100 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_101 = ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_101 = R1_101 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } + type R1_102 = ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: P }) + type R2_102 = R1_102 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_103 = ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: Q }) + type R2_103 = R1_103 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_104 = ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_104 = R1_104 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } + type R1_105 = ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: P }) + type R2_105 = R1_105 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_106 = ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: Q }) + type R2_106 = R1_106 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_107 = ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_107 = R1_107 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } type R1_108 = ( C { val y: P }) with ( Any { val y: P }) type R2_108 = R1_108 { val y: (P) with (P) } type R1_109 = ( C { val y: P }) with ( Any { val y: Q }) type R2_109 = R1_109 { val y: (P) with (Q) } - type R1_110 = ( C { val y: P }) with ( Any { val y: R forSome { type R <: P with Q } }) - type R2_110 = R1_110 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_110 = ( C { val y: P }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_110 = R1_110 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_111 = ( C { val y: P }) with ( A { val y: P }) type R2_111 = R1_111 { val y: (P) with (P) } type R1_112 = ( C { val y: P }) with ( A { val y: Q }) type R2_112 = R1_112 { val y: (P) with (Q) } - type R1_113 = ( C { val y: P }) with ( A { val y: R forSome { type R <: P with Q } }) - type R2_113 = R1_113 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_113 = ( C { val y: P }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_113 = R1_113 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_114 = ( C { val y: P }) with ( B { val y: P }) type R2_114 = R1_114 { val y: (P) with (P) } type R1_115 = ( C { val y: P }) with ( B { val y: Q }) type R2_115 = R1_115 { val y: (P) with (Q) } - type R1_116 = ( C { val y: P }) with ( B { val y: R forSome { type R <: P with Q } }) - type R2_116 = R1_116 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_116 = ( C { val y: P }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_116 = R1_116 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_117 = ( C { val y: P }) with ( C { val y: P }) type R2_117 = R1_117 { val y: (P) with (P) } type R1_118 = ( C { val y: P }) with ( C { val y: Q }) type R2_118 = R1_118 { val y: (P) with (Q) } - type R1_119 = ( C { val y: P }) with ( C { val y: R forSome { type R <: P with Q } }) - type R2_119 = R1_119 { val y: (P) with (R forSome { type R <: P with Q }) } + type R1_119 = ( C { val y: P }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_119 = R1_119 { val y: (P) with (P with R forSome { + type R <: P with Q +}) } type R1_120 = ( C { val y: Q }) with ( Any { val y: P }) type R2_120 = R1_120 { val y: (Q) with (P) } type R1_121 = ( C { val y: Q }) with ( Any { val y: Q }) type R2_121 = R1_121 { val y: (Q) with (Q) } - type R1_122 = ( C { val y: Q }) with ( Any { val y: R forSome { type R <: P with Q } }) - type R2_122 = R1_122 { val y: (Q) with (R forSome { type R <: P with Q }) } + type R1_122 = ( C { val y: Q }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_122 = R1_122 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } type R1_123 = ( C { val y: Q }) with ( A { val y: P }) type R2_123 = R1_123 { val y: (Q) with (P) } type R1_124 = ( C { val y: Q }) with ( A { val y: Q }) type R2_124 = R1_124 { val y: (Q) with (Q) } - type R1_125 = ( C { val y: Q }) with ( A { val y: R forSome { type R <: P with Q } }) - type R2_125 = R1_125 { val y: (Q) with (R forSome { type R <: P with Q }) } + type R1_125 = ( C { val y: Q }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_125 = R1_125 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } type R1_126 = ( C { val y: Q }) with ( B { val y: P }) type R2_126 = R1_126 { val y: (Q) with (P) } type R1_127 = ( C { val y: Q }) with ( B { val y: Q }) type R2_127 = R1_127 { val y: (Q) with (Q) } - type R1_128 = ( C { val y: Q }) with ( B { val y: R forSome { type R <: P with Q } }) - type R2_128 = R1_128 { val y: (Q) with (R forSome { type R <: P with Q }) } + type R1_128 = ( C { val y: Q }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_128 = R1_128 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } type R1_129 = ( C { val y: Q }) with ( C { val y: P }) type R2_129 = R1_129 { val y: (Q) with (P) } type R1_130 = ( C { val y: Q }) with ( C { val y: Q }) type R2_130 = R1_130 { val y: (Q) with (Q) } - type R1_131 = ( C { val y: Q }) with ( C { val y: R forSome { type R <: P with Q } }) - type R2_131 = R1_131 { val y: (Q) with (R forSome { type R <: P with Q }) } - type R1_132 = ( C { val y: R forSome { type R <: P with Q } }) with ( Any { val y: P }) - type R2_132 = R1_132 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_133 = ( C { val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q }) - type R2_133 = R1_133 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_134 = ( C { val y: R forSome { type R <: P with Q } }) with ( Any { val y: R forSome { type R <: P with Q } }) - type R2_134 = R1_134 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } - type R1_135 = ( C { val y: R forSome { type R <: P with Q } }) with ( A { val y: P }) - type R2_135 = R1_135 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_136 = ( C { val y: R forSome { type R <: P with Q } }) with ( A { val y: Q }) - type R2_136 = R1_136 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_137 = ( C { val y: R forSome { type R <: P with Q } }) with ( A { val y: R forSome { type R <: P with Q } }) - type R2_137 = R1_137 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } - type R1_138 = ( C { val y: R forSome { type R <: P with Q } }) with ( B { val y: P }) - type R2_138 = R1_138 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_139 = ( C { val y: R forSome { type R <: P with Q } }) with ( B { val y: Q }) - type R2_139 = R1_139 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_140 = ( C { val y: R forSome { type R <: P with Q } }) with ( B { val y: R forSome { type R <: P with Q } }) - type R2_140 = R1_140 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } - type R1_141 = ( C { val y: R forSome { type R <: P with Q } }) with ( C { val y: P }) - type R2_141 = R1_141 { val y: (R forSome { type R <: P with Q }) with (P) } - type R1_142 = ( C { val y: R forSome { type R <: P with Q } }) with ( C { val y: Q }) - type R2_142 = R1_142 { val y: (R forSome { type R <: P with Q }) with (Q) } - type R1_143 = ( C { val y: R forSome { type R <: P with Q } }) with ( C { val y: R forSome { type R <: P with Q } }) - type R2_143 = R1_143 { val y: (R forSome { type R <: P with Q }) with (R forSome { type R <: P with Q }) } + type R1_131 = ( C { val y: Q }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_131 = R1_131 { val y: (Q) with (Q with R forSome { + type R <: P with Q +}) } + type R1_132 = ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: P }) + type R2_132 = R1_132 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_133 = ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q }) + type R2_133 = R1_133 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_134 = ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_134 = R1_134 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } + type R1_135 = ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: P }) + type R2_135 = R1_135 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_136 = ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: Q }) + type R2_136 = R1_136 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_137 = ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_137 = R1_137 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } + type R1_138 = ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: P }) + type R2_138 = R1_138 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_139 = ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: Q }) + type R2_139 = R1_139 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_140 = ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_140 = R1_140 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } + type R1_141 = ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: P }) + type R2_141 = R1_141 { val y: (R forSome { + type R <: P with Q +} with P) with (P) } + type R1_142 = ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: Q }) + type R2_142 = R1_142 { val y: (R forSome { + type R <: P with Q +} with Q) with (Q) } + type R1_143 = ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) + type R2_143 = R1_143 { val y: (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) with (R forSome { + type R <: P with Q +} with R forSome { + type R <: P with Q +}) } def f0 = { val x = ((new ABC): ( Any { val y: P }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } def f1 = { val x = ((new ABC): ( Any { val y: P }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f2 = { val x = ((new ABC): ( Any { val y: P }) with ( Any { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f2 = { val x = ((new ABC): ( Any { val y: P }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f3 = { val x = ((new ABC): ( Any { val y: P }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } def f4 = { val x = ((new ABC): ( Any { val y: P }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f5 = { val x = ((new ABC): ( Any { val y: P }) with ( A { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f5 = { val x = ((new ABC): ( Any { val y: P }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f6 = { val x = ((new ABC): ( Any { val y: P }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } def f7 = { val x = ((new ABC): ( Any { val y: P }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f8 = { val x = ((new ABC): ( Any { val y: P }) with ( B { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f8 = { val x = ((new ABC): ( Any { val y: P }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f9 = { val x = ((new ABC): ( Any { val y: P }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } def f10 = { val x = ((new ABC): ( Any { val y: P }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f11 = { val x = ((new ABC): ( Any { val y: P }) with ( C { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f11 = { val x = ((new ABC): ( Any { val y: P }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f12 = { val x = ((new ABC): ( Any { val y: Q }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } def f13 = { val x = ((new ABC): ( Any { val y: Q }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f14 = { val x = ((new ABC): ( Any { val y: Q }) with ( Any { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f14 = { val x = ((new ABC): ( Any { val y: Q }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f15 = { val x = ((new ABC): ( Any { val y: Q }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } def f16 = { val x = ((new ABC): ( Any { val y: Q }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f17 = { val x = ((new ABC): ( Any { val y: Q }) with ( A { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f17 = { val x = ((new ABC): ( Any { val y: Q }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f18 = { val x = ((new ABC): ( Any { val y: Q }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } def f19 = { val x = ((new ABC): ( Any { val y: Q }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f20 = { val x = ((new ABC): ( Any { val y: Q }) with ( B { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f20 = { val x = ((new ABC): ( Any { val y: Q }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f21 = { val x = ((new ABC): ( Any { val y: Q }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } def f22 = { val x = ((new ABC): ( Any { val y: Q }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f23 = { val x = ((new ABC): ( Any { val y: Q }) with ( C { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f24 = { val x = ((new ABC): ( Any { val y: R forSome { type R <: P with Q } }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f25 = { val x = ((new ABC): ( Any { val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f26 = { val x = ((new ABC): ( Any { val y: R forSome { type R <: P with Q } }) with ( Any { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f27 = { val x = ((new ABC): ( Any { val y: R forSome { type R <: P with Q } }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f28 = { val x = ((new ABC): ( Any { val y: R forSome { type R <: P with Q } }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f29 = { val x = ((new ABC): ( Any { val y: R forSome { type R <: P with Q } }) with ( A { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f30 = { val x = ((new ABC): ( Any { val y: R forSome { type R <: P with Q } }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f31 = { val x = ((new ABC): ( Any { val y: R forSome { type R <: P with Q } }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f32 = { val x = ((new ABC): ( Any { val y: R forSome { type R <: P with Q } }) with ( B { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f33 = { val x = ((new ABC): ( Any { val y: R forSome { type R <: P with Q } }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f34 = { val x = ((new ABC): ( Any { val y: R forSome { type R <: P with Q } }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f35 = { val x = ((new ABC): ( Any { val y: R forSome { type R <: P with Q } }) with ( C { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f23 = { val x = ((new ABC): ( Any { val y: Q }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f24 = { val x = ((new ABC): ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f25 = { val x = ((new ABC): ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f26 = { val x = ((new ABC): ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f27 = { val x = ((new ABC): ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f28 = { val x = ((new ABC): ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f29 = { val x = ((new ABC): ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f30 = { val x = ((new ABC): ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f31 = { val x = ((new ABC): ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f32 = { val x = ((new ABC): ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f33 = { val x = ((new ABC): ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f34 = { val x = ((new ABC): ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f35 = { val x = ((new ABC): ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f36 = { val x = ((new ABC): ( A { val y: P }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } def f37 = { val x = ((new ABC): ( A { val y: P }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f38 = { val x = ((new ABC): ( A { val y: P }) with ( Any { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f38 = { val x = ((new ABC): ( A { val y: P }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f39 = { val x = ((new ABC): ( A { val y: P }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } def f40 = { val x = ((new ABC): ( A { val y: P }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f41 = { val x = ((new ABC): ( A { val y: P }) with ( A { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f41 = { val x = ((new ABC): ( A { val y: P }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f42 = { val x = ((new ABC): ( A { val y: P }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } def f43 = { val x = ((new ABC): ( A { val y: P }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f44 = { val x = ((new ABC): ( A { val y: P }) with ( B { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f44 = { val x = ((new ABC): ( A { val y: P }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f45 = { val x = ((new ABC): ( A { val y: P }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } def f46 = { val x = ((new ABC): ( A { val y: P }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f47 = { val x = ((new ABC): ( A { val y: P }) with ( C { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f47 = { val x = ((new ABC): ( A { val y: P }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f48 = { val x = ((new ABC): ( A { val y: Q }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } def f49 = { val x = ((new ABC): ( A { val y: Q }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f50 = { val x = ((new ABC): ( A { val y: Q }) with ( Any { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f50 = { val x = ((new ABC): ( A { val y: Q }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f51 = { val x = ((new ABC): ( A { val y: Q }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } def f52 = { val x = ((new ABC): ( A { val y: Q }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f53 = { val x = ((new ABC): ( A { val y: Q }) with ( A { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f53 = { val x = ((new ABC): ( A { val y: Q }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f54 = { val x = ((new ABC): ( A { val y: Q }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } def f55 = { val x = ((new ABC): ( A { val y: Q }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f56 = { val x = ((new ABC): ( A { val y: Q }) with ( B { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f56 = { val x = ((new ABC): ( A { val y: Q }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f57 = { val x = ((new ABC): ( A { val y: Q }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } def f58 = { val x = ((new ABC): ( A { val y: Q }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f59 = { val x = ((new ABC): ( A { val y: Q }) with ( C { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f60 = { val x = ((new ABC): ( A { val y: R forSome { type R <: P with Q } }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f61 = { val x = ((new ABC): ( A { val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f62 = { val x = ((new ABC): ( A { val y: R forSome { type R <: P with Q } }) with ( Any { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f63 = { val x = ((new ABC): ( A { val y: R forSome { type R <: P with Q } }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f64 = { val x = ((new ABC): ( A { val y: R forSome { type R <: P with Q } }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f65 = { val x = ((new ABC): ( A { val y: R forSome { type R <: P with Q } }) with ( A { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f66 = { val x = ((new ABC): ( A { val y: R forSome { type R <: P with Q } }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f67 = { val x = ((new ABC): ( A { val y: R forSome { type R <: P with Q } }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f68 = { val x = ((new ABC): ( A { val y: R forSome { type R <: P with Q } }) with ( B { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f69 = { val x = ((new ABC): ( A { val y: R forSome { type R <: P with Q } }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f70 = { val x = ((new ABC): ( A { val y: R forSome { type R <: P with Q } }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f71 = { val x = ((new ABC): ( A { val y: R forSome { type R <: P with Q } }) with ( C { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f59 = { val x = ((new ABC): ( A { val y: Q }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f60 = { val x = ((new ABC): ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f61 = { val x = ((new ABC): ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f62 = { val x = ((new ABC): ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f63 = { val x = ((new ABC): ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f64 = { val x = ((new ABC): ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f65 = { val x = ((new ABC): ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f66 = { val x = ((new ABC): ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f67 = { val x = ((new ABC): ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f68 = { val x = ((new ABC): ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f69 = { val x = ((new ABC): ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f70 = { val x = ((new ABC): ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f71 = { val x = ((new ABC): ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f72 = { val x = ((new ABC): ( B { val y: P }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } def f73 = { val x = ((new ABC): ( B { val y: P }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f74 = { val x = ((new ABC): ( B { val y: P }) with ( Any { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f74 = { val x = ((new ABC): ( B { val y: P }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f75 = { val x = ((new ABC): ( B { val y: P }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } def f76 = { val x = ((new ABC): ( B { val y: P }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f77 = { val x = ((new ABC): ( B { val y: P }) with ( A { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f77 = { val x = ((new ABC): ( B { val y: P }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f78 = { val x = ((new ABC): ( B { val y: P }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } def f79 = { val x = ((new ABC): ( B { val y: P }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f80 = { val x = ((new ABC): ( B { val y: P }) with ( B { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f80 = { val x = ((new ABC): ( B { val y: P }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f81 = { val x = ((new ABC): ( B { val y: P }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } def f82 = { val x = ((new ABC): ( B { val y: P }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f83 = { val x = ((new ABC): ( B { val y: P }) with ( C { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f83 = { val x = ((new ABC): ( B { val y: P }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f84 = { val x = ((new ABC): ( B { val y: Q }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } def f85 = { val x = ((new ABC): ( B { val y: Q }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f86 = { val x = ((new ABC): ( B { val y: Q }) with ( Any { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f86 = { val x = ((new ABC): ( B { val y: Q }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f87 = { val x = ((new ABC): ( B { val y: Q }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } def f88 = { val x = ((new ABC): ( B { val y: Q }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f89 = { val x = ((new ABC): ( B { val y: Q }) with ( A { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f89 = { val x = ((new ABC): ( B { val y: Q }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f90 = { val x = ((new ABC): ( B { val y: Q }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } def f91 = { val x = ((new ABC): ( B { val y: Q }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f92 = { val x = ((new ABC): ( B { val y: Q }) with ( B { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f92 = { val x = ((new ABC): ( B { val y: Q }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f93 = { val x = ((new ABC): ( B { val y: Q }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } def f94 = { val x = ((new ABC): ( B { val y: Q }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f95 = { val x = ((new ABC): ( B { val y: Q }) with ( C { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f96 = { val x = ((new ABC): ( B { val y: R forSome { type R <: P with Q } }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f97 = { val x = ((new ABC): ( B { val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f98 = { val x = ((new ABC): ( B { val y: R forSome { type R <: P with Q } }) with ( Any { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f99 = { val x = ((new ABC): ( B { val y: R forSome { type R <: P with Q } }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f100 = { val x = ((new ABC): ( B { val y: R forSome { type R <: P with Q } }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f101 = { val x = ((new ABC): ( B { val y: R forSome { type R <: P with Q } }) with ( A { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f102 = { val x = ((new ABC): ( B { val y: R forSome { type R <: P with Q } }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f103 = { val x = ((new ABC): ( B { val y: R forSome { type R <: P with Q } }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f104 = { val x = ((new ABC): ( B { val y: R forSome { type R <: P with Q } }) with ( B { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f105 = { val x = ((new ABC): ( B { val y: R forSome { type R <: P with Q } }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f106 = { val x = ((new ABC): ( B { val y: R forSome { type R <: P with Q } }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f107 = { val x = ((new ABC): ( B { val y: R forSome { type R <: P with Q } }) with ( C { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f95 = { val x = ((new ABC): ( B { val y: Q }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f96 = { val x = ((new ABC): ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f97 = { val x = ((new ABC): ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f98 = { val x = ((new ABC): ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f99 = { val x = ((new ABC): ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f100 = { val x = ((new ABC): ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f101 = { val x = ((new ABC): ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f102 = { val x = ((new ABC): ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f103 = { val x = ((new ABC): ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f104 = { val x = ((new ABC): ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f105 = { val x = ((new ABC): ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f106 = { val x = ((new ABC): ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f107 = { val x = ((new ABC): ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f108 = { val x = ((new ABC): ( C { val y: P }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } def f109 = { val x = ((new ABC): ( C { val y: P }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f110 = { val x = ((new ABC): ( C { val y: P }) with ( Any { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f110 = { val x = ((new ABC): ( C { val y: P }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f111 = { val x = ((new ABC): ( C { val y: P }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } def f112 = { val x = ((new ABC): ( C { val y: P }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f113 = { val x = ((new ABC): ( C { val y: P }) with ( A { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f113 = { val x = ((new ABC): ( C { val y: P }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f114 = { val x = ((new ABC): ( C { val y: P }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } def f115 = { val x = ((new ABC): ( C { val y: P }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f116 = { val x = ((new ABC): ( C { val y: P }) with ( B { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f116 = { val x = ((new ABC): ( C { val y: P }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f117 = { val x = ((new ABC): ( C { val y: P }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } def f118 = { val x = ((new ABC): ( C { val y: P }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f119 = { val x = ((new ABC): ( C { val y: P }) with ( C { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f119 = { val x = ((new ABC): ( C { val y: P }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f120 = { val x = ((new ABC): ( C { val y: Q }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } def f121 = { val x = ((new ABC): ( C { val y: Q }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f122 = { val x = ((new ABC): ( C { val y: Q }) with ( Any { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f122 = { val x = ((new ABC): ( C { val y: Q }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f123 = { val x = ((new ABC): ( C { val y: Q }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } def f124 = { val x = ((new ABC): ( C { val y: Q }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f125 = { val x = ((new ABC): ( C { val y: Q }) with ( A { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f125 = { val x = ((new ABC): ( C { val y: Q }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f126 = { val x = ((new ABC): ( C { val y: Q }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } def f127 = { val x = ((new ABC): ( C { val y: Q }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f128 = { val x = ((new ABC): ( C { val y: Q }) with ( B { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f128 = { val x = ((new ABC): ( C { val y: Q }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def f129 = { val x = ((new ABC): ( C { val y: Q }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } def f130 = { val x = ((new ABC): ( C { val y: Q }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f131 = { val x = ((new ABC): ( C { val y: Q }) with ( C { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f132 = { val x = ((new ABC): ( C { val y: R forSome { type R <: P with Q } }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f133 = { val x = ((new ABC): ( C { val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f134 = { val x = ((new ABC): ( C { val y: R forSome { type R <: P with Q } }) with ( Any { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f135 = { val x = ((new ABC): ( C { val y: R forSome { type R <: P with Q } }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f136 = { val x = ((new ABC): ( C { val y: R forSome { type R <: P with Q } }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f137 = { val x = ((new ABC): ( C { val y: R forSome { type R <: P with Q } }) with ( A { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f138 = { val x = ((new ABC): ( C { val y: R forSome { type R <: P with Q } }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f139 = { val x = ((new ABC): ( C { val y: R forSome { type R <: P with Q } }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f140 = { val x = ((new ABC): ( C { val y: R forSome { type R <: P with Q } }) with ( B { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } - def f141 = { val x = ((new ABC): ( C { val y: R forSome { type R <: P with Q } }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } - def f142 = { val x = ((new ABC): ( C { val y: R forSome { type R <: P with Q } }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } - def f143 = { val x = ((new ABC): ( C { val y: R forSome { type R <: P with Q } }) with ( C { val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f131 = { val x = ((new ABC): ( C { val y: Q }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f132 = { val x = ((new ABC): ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f133 = { val x = ((new ABC): ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f134 = { val x = ((new ABC): ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( Any { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f135 = { val x = ((new ABC): ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f136 = { val x = ((new ABC): ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f137 = { val x = ((new ABC): ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( A { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f138 = { val x = ((new ABC): ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f139 = { val x = ((new ABC): ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f140 = { val x = ((new ABC): ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( B { val y: <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } + def f141 = { val x = ((new ABC): ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: P })) ; x.y.reflected -> whatis(x).toString } + def f142 = { val x = ((new ABC): ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: Q })) ; x.y.reflected -> whatis(x).toString } + def f143 = { val x = ((new ABC): ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } }) with ( C { val y: override <stable> <accessor> val y: R forSome { type R <: P with Q } })) ; x.y.reflected -> whatis(x).toString } def g0(x: R1_0) = x.y def g1(x: R1_1) = x.y def g2(x: R1_2) = x.y @@ -876,7 +1132,7 @@ object Test { f143 ) - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { sshow("Direct Calls", fcalls collect { case (false, n) => n }) sshow("Reflective Calls", fcalls collect { case (true, n) => n }) // For a good time try printing this - have to fix bugs in diff --git a/tests/pending/run/t3493.scala b/tests/pending/run/t3493.scala index aafe7a3a4..c13da2551 100644 --- a/tests/pending/run/t3493.scala +++ b/tests/pending/run/t3493.scala @@ -4,7 +4,7 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { import scala.collection.immutable._ val x = TreeSet("a", "b", "c", "d") val x2 = x + "e" diff --git a/tests/pending/run/t3496.scala b/tests/pending/run/t3496.scala index e1aa032ab..35bc5db24 100644 --- a/tests/pending/run/t3496.scala +++ b/tests/pending/run/t3496.scala @@ -5,7 +5,7 @@ // ticket #3496 object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val s = Stream.from(1) s.take(5) s.drop(5) diff --git a/tests/pending/run/t3502.scala b/tests/pending/run/t3502.scala index cc78e54c8..2f432e486 100644 --- a/tests/pending/run/t3502.scala +++ b/tests/pending/run/t3502.scala @@ -14,7 +14,7 @@ object Test { } } - def main(args:Array[String]) { + def main(args:Array[String]): Unit = { // a prime number //val num = 623456789 val num = 2796203 diff --git a/tests/pending/run/t3508.scala b/tests/pending/run/t3508.scala index 01d976ba0..80ef89a61 100644 --- a/tests/pending/run/t3508.scala +++ b/tests/pending/run/t3508.scala @@ -5,7 +5,7 @@ import collection.immutable._ // ticket #3508 object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { assert(Stream.tabulate(123)(_ + 1).toList == List.tabulate(123)(_ + 1)) } } diff --git a/tests/pending/run/t3509.scala b/tests/pending/run/t3509.scala index 76f8d6016..8e1986f34 100644 --- a/tests/pending/run/t3509.scala +++ b/tests/pending/run/t3509.scala @@ -6,4 +6,4 @@ object Test { val foo = new Foo(0) foo.i += 1 } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t3511.scala b/tests/pending/run/t3511.scala index 30757b1a6..0df0321ad 100644 --- a/tests/pending/run/t3511.scala +++ b/tests/pending/run/t3511.scala @@ -7,7 +7,7 @@ import scala.collection.immutable._ // ticket #3511 object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { assert(Stream.from(0).view.force.take(5) == List(0, 1, 2, 3, 4)) val s = Stream.from(0) diff --git a/tests/pending/run/t3530.scala b/tests/pending/run/t3530.scala index f6f7fb422..7fd9fc805 100644 --- a/tests/pending/run/t3530.scala +++ b/tests/pending/run/t3530.scala @@ -9,12 +9,12 @@ object Test { def f2[T](x: List[T]) = println(x match { case List(_, _) => "two" case List(_, _, _) => "three" - case List(xs @ _*) => "list: " + xs.length + case List(xs : _*) => "list: " + xs.length // bug: the default case is marked unreachable // case _ => "not a list" }) - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { f(List(1, 2)) f(List('a', 'b', 'c')) f(List('a', 'b', 'c', 'd')) @@ -32,4 +32,4 @@ object Test { // bug: this NPEs on xs.length // f2(null) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t3563.scala b/tests/pending/run/t3563.scala index 8abbb6080..5cc5a611a 100644 --- a/tests/pending/run/t3563.scala +++ b/tests/pending/run/t3563.scala @@ -6,7 +6,7 @@ // ticket #3563 object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { var sum = 0 val setseq = Set(1, 2, 3, 4).toSeq setseq.map( n => { sum += n; n * n }).head diff --git a/tests/pending/run/t3569.scala b/tests/pending/run/t3569.scala index eb3b42443..f9a916185 100644 --- a/tests/pending/run/t3569.scala +++ b/tests/pending/run/t3569.scala @@ -20,7 +20,7 @@ object Test { case class Y(final var x: Int, final private var y: Int, final val z1: Int, final private val z2: Int) { } def f = new X(0).x += 1 - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { f val s = new X(0) s.x += 1 diff --git a/tests/pending/run/t3580.scala b/tests/pending/run/t3580.scala index 50ff6c455..f91d5a24f 100644 --- a/tests/pending/run/t3580.scala +++ b/tests/pending/run/t3580.scala @@ -6,10 +6,10 @@ object Test { class Empty extends Traversable[Nothing] { - def foreach[U](f: Nothing => U) {} + def foreach[U](f: Nothing => U): Unit = {} } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val t = new Empty t.toStream } diff --git a/tests/pending/run/t3603.scala b/tests/pending/run/t3603.scala index a89cb7080..25ca49b54 100644 --- a/tests/pending/run/t3603.scala +++ b/tests/pending/run/t3603.scala @@ -3,7 +3,7 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { import collection.immutable._ val intmap = IntMap(1 -> 1, 2 -> 2) diff --git a/tests/pending/run/t363.scala b/tests/pending/run/t363.scala index c747be2ec..68744ef48 100644 --- a/tests/pending/run/t363.scala +++ b/tests/pending/run/t363.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println("I love the smell of (Array[String])Unit in the morning.") } } diff --git a/tests/pending/run/t3645.scala b/tests/pending/run/t3645.scala index af2543377..cada14cd1 100644 --- a/tests/pending/run/t3645.scala +++ b/tests/pending/run/t3645.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val s = Stream.tabulate(5)(x => x+2) assert( s.toList == List(2,3,4,5,6) ) } diff --git a/tests/pending/run/t3647.scala b/tests/pending/run/t3647.scala index a970e887f..8202c30e7 100644 --- a/tests/pending/run/t3647.scala +++ b/tests/pending/run/t3647.scala @@ -5,7 +5,7 @@ import collection.immutable._ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val ps = PagedSeq.fromLines(List( "line1", "line2", diff --git a/tests/pending/run/t3651.scala b/tests/pending/run/t3651.scala index 3a6dda0de..c4c5c2ed6 100644 --- a/tests/pending/run/t3651.scala +++ b/tests/pending/run/t3651.scala @@ -3,7 +3,7 @@ class Klass[@specialized(Long) A]( val a: A ) class LongKlass( override val a: Long ) extends Klass[Long](a) object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val lk = new LongKlass(10) val a = lk.a } diff --git a/tests/pending/run/t3667.scala b/tests/pending/run/t3667.scala index ada09d588..fd3d6dc4d 100644 --- a/tests/pending/run/t3667.scala +++ b/tests/pending/run/t3667.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val o4 = new Outer4 val o5 = new Outer5 val o6 = new Outer6 @@ -22,13 +22,13 @@ object Test { foo } - def foo { + def foo: Unit = { case class C(x: Int) ser(new C(1)) ser(C) } - def ser(o: AnyRef) { + def ser(o: AnyRef): Unit = { val oos = new java.io.ObjectOutputStream(new java.io.ByteArrayOutputStream()) oos.writeObject(o) oos.close() diff --git a/tests/pending/run/t3670.scala b/tests/pending/run/t3670.scala index 97f1e8a79..4a26e34f3 100644 --- a/tests/pending/run/t3670.scala +++ b/tests/pending/run/t3670.scala @@ -12,7 +12,7 @@ class C { } class M extends App { - def foo { + def foo: Unit = { lazy val a = { lazy val b = 1 lazy val c = 2 diff --git a/tests/pending/run/t3699.scala b/tests/pending/run/t3699.scala index 047535388..f838bcb52 100644 --- a/tests/pending/run/t3699.scala +++ b/tests/pending/run/t3699.scala @@ -8,4 +8,4 @@ object Test { def main(args: Array[String]) = { assert(act(1) == 9) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t3714.scala b/tests/pending/run/t3714.scala index 2d600f97f..23a1e2e49 100644 --- a/tests/pending/run/t3714.scala +++ b/tests/pending/run/t3714.scala @@ -22,7 +22,7 @@ object Test { case _ => -1 } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val break = BreakImpl(22) // assert(f1(break) == 22) assert(f2(break) == 22) diff --git a/tests/pending/run/t3761-overload-byname.scala b/tests/pending/run/t3761-overload-byname.scala index a52d86609..3b27271f0 100644 --- a/tests/pending/run/t3761-overload-byname.scala +++ b/tests/pending/run/t3761-overload-byname.scala @@ -21,7 +21,7 @@ class OverTheTop { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val top = new OverTheTop println(top.info0("hello")) println(top.info0("hello","working","world")) diff --git a/tests/pending/run/t3798.scala b/tests/pending/run/t3798.scala index 3ede57bee..698d5a88e 100644 --- a/tests/pending/run/t3798.scala +++ b/tests/pending/run/t3798.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val seq: MySeq[Undefined] = new MySeq[Floats](new Array[Float](10)) println(10 == seq.array.length) } diff --git a/tests/pending/run/t3829.scala b/tests/pending/run/t3829.scala index 780a6a95b..ec9772964 100644 --- a/tests/pending/run/t3829.scala +++ b/tests/pending/run/t3829.scala @@ -2,7 +2,7 @@ object Test { import collection.{ mutable, immutable } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val map = immutable.Map(1 -> 2, 3 -> 4) assert(map.get(0) == None) diff --git a/tests/pending/run/t3877.scala b/tests/pending/run/t3877.scala index 5710e982a..5d8006f4f 100644 --- a/tests/pending/run/t3877.scala +++ b/tests/pending/run/t3877.scala @@ -1,7 +1,7 @@ object Test { val LIMIT = 10 - def test1 { + def test1: Unit = { var d = 2 var i = 0 // avoid infinite loops while (d < LIMIT && i < LIMIT) { @@ -12,7 +12,7 @@ object Test { } } - def test2 { + def test2: Unit = { var d = 2 var i = 0 while (true) { @@ -26,7 +26,7 @@ object Test { } } - def test3 { + def test3: Unit = { var d = 2 var i = 0 do { @@ -37,7 +37,7 @@ object Test { } while (d < LIMIT && i < LIMIT) } - def test4 { + def test4: Unit = { var d = 2 var i = 0 do { @@ -50,7 +50,7 @@ object Test { } while (true) } - def test5 { + def test5: Unit = { var d = 2 var i = 0 while (d < LIMIT && i < LIMIT) { @@ -71,7 +71,7 @@ object Test { } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { test1 test2 test3 diff --git a/tests/pending/run/t3887.scala b/tests/pending/run/t3887.scala index 16ce983ef..88a19419e 100644 --- a/tests/pending/run/t3887.scala +++ b/tests/pending/run/t3887.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { assert( matchPair(1) ) assert( !matchPair(2) ) } diff --git a/tests/pending/run/t3895.scala b/tests/pending/run/t3895.scala index 9028e0a08..5f83235de 100644 --- a/tests/pending/run/t3895.scala +++ b/tests/pending/run/t3895.scala @@ -28,7 +28,7 @@ class Impl extends T object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println(new B().bb) println(new C().bb) } diff --git a/tests/pending/run/t3895b.scala b/tests/pending/run/t3895b.scala index a74f7b2ea..1ef35521f 100644 --- a/tests/pending/run/t3895b.scala +++ b/tests/pending/run/t3895b.scala @@ -11,7 +11,7 @@ class DryRun { lazy val test2 = 1 object test3 } - def test { + def test: Unit = { compiler.test1 compiler.test2 compiler.test3 @@ -21,7 +21,7 @@ class DryRun { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new DryRun().test } } diff --git a/tests/pending/run/t3935.scala b/tests/pending/run/t3935.scala index fa1bbf8d3..84e39571c 100644 --- a/tests/pending/run/t3935.scala +++ b/tests/pending/run/t3935.scala @@ -3,7 +3,7 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val q = scala.collection.mutable.Queue[String]() assert(q.length == 0) try { diff --git a/tests/pending/run/t3970.scala b/tests/pending/run/t3970.scala index 35b5ce6e1..4a1b7fd00 100644 --- a/tests/pending/run/t3970.scala +++ b/tests/pending/run/t3970.scala @@ -6,7 +6,7 @@ import collection.mutable._ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val dl = DoubleLinkedList[Int]() dl.remove() diff --git a/tests/pending/run/t3980.scala b/tests/pending/run/t3980.scala index c140176ce..dbe9644ea 100644 --- a/tests/pending/run/t3980.scala +++ b/tests/pending/run/t3980.scala @@ -1,10 +1,10 @@ object A { - def run1 { + def run1: Unit = { lazy val x: Unit = {(); println("once")} x x } - def run2 { + def run2: Unit = { lazy val y: Int = 2 println(y) println(y) @@ -16,4 +16,4 @@ object Test { A.run1 A.run2 } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t3984.scala b/tests/pending/run/t3984.scala index 0747b0ee2..15e50b10f 100644 --- a/tests/pending/run/t3984.scala +++ b/tests/pending/run/t3984.scala @@ -6,7 +6,7 @@ object SetBug { override def hashCode: Int = h } - def run() { + def run(): Unit = { var is = ImmutSet.empty[IH] var ms = MutSet.empty[IH] for (ih <- List(IH(2,0),IH(0,0),IH(4,4),IH(6,4),IH(-8,1520786080))) { @@ -29,7 +29,7 @@ object MapBug { override def hashCode: Int = h } - def run() { + def run(): Unit = { var im = ImmutMap.empty[IH,IH] var mm = MutMap.empty[IH,IH] for (ih <- List(IH(2,0),IH(0,0),IH(4,4),IH(6,4),IH(-8,1520786080))) { diff --git a/tests/pending/run/t3989.scala b/tests/pending/run/t3989.scala index 0daa8abee..896283f19 100644 --- a/tests/pending/run/t3989.scala +++ b/tests/pending/run/t3989.scala @@ -7,7 +7,7 @@ class Foo{ override def equals(o: Any) = false; override def hashCode = 1} // should not result in a stack overflow object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { import collection.immutable.HashMap var m = Map[Foo, Int]() for (i <- 1 to 30000) m += (new Foo) -> i diff --git a/tests/pending/run/t3996.scala b/tests/pending/run/t3996.scala index e6e5549cf..b40b3ec11 100644 --- a/tests/pending/run/t3996.scala +++ b/tests/pending/run/t3996.scala @@ -5,7 +5,7 @@ // should not result in a stack overflow object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { import collection.mutable.LinkedList val l = new LinkedList[Int]() ++ (0 until 10000) assert(l.length == 10000) diff --git a/tests/pending/run/t4013.scala b/tests/pending/run/t4013.scala index 706055931..98cc5e881 100644 --- a/tests/pending/run/t4013.scala +++ b/tests/pending/run/t4013.scala @@ -16,7 +16,7 @@ class Subopt[@specialized B](override val data: Option[B]) extends Base[B] { object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val ss = new Suba[String](Array("")) val si = new Suba[Int](Array(0)) new Subopt[Int](Some(0)) diff --git a/tests/pending/run/t4013b.scala b/tests/pending/run/t4013b.scala index 1262e261f..78f554b33 100644 --- a/tests/pending/run/t4013b.scala +++ b/tests/pending/run/t4013b.scala @@ -14,7 +14,7 @@ class Sub3[@specialized(Int) B](override val data: M[B]) extends Base[B] { object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new Sub3[Int](new M[Int]) } } diff --git a/tests/pending/run/t4013c.scala b/tests/pending/run/t4013c.scala index 5737fff36..3b0d87574 100644 --- a/tests/pending/run/t4013c.scala +++ b/tests/pending/run/t4013c.scala @@ -4,7 +4,7 @@ class Suba[@specialized(Int) B](val data: Array[B]) { object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new Suba[Int](Array(0)) } } diff --git a/tests/pending/run/t4023.scala b/tests/pending/run/t4023.scala index 518b58382..68f5ec815 100644 --- a/tests/pending/run/t4023.scala +++ b/tests/pending/run/t4023.scala @@ -20,7 +20,7 @@ object Test { val valuesTry3 = C.classes3.sortBy(_.getName) } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println("Try 1: (" + TestHelper.valuesTry1.length + " classes)") TestHelper.valuesTry1.foreach(println) println("Try 2: (" + TestHelper.valuesTry2.length + " classes)") diff --git a/tests/pending/run/t4054.scala b/tests/pending/run/t4054.scala index 83a58ef97..b57c08361 100644 --- a/tests/pending/run/t4054.scala +++ b/tests/pending/run/t4054.scala @@ -7,7 +7,7 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val it = Iterator.from(1).map(n => n * n).scanLeft(0)(_+_) assert(it.next == 0) diff --git a/tests/pending/run/t4072.scala b/tests/pending/run/t4072.scala index c035fcc22..3b31d33cd 100644 --- a/tests/pending/run/t4072.scala +++ b/tests/pending/run/t4072.scala @@ -9,7 +9,7 @@ object Test { } } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new DryRun().compiler.test1 } } diff --git a/tests/pending/run/t4080.scala b/tests/pending/run/t4080.scala index 1d1418847..551738018 100644 --- a/tests/pending/run/t4080.scala +++ b/tests/pending/run/t4080.scala @@ -2,7 +2,7 @@ import scala.collection.mutable.LinkedList import java.util.NoSuchElementException object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val ll = LinkedList(1, 2, 3) ll.insert(LinkedList(0)) println(ll) diff --git a/tests/pending/run/t4110-new.scala b/tests/pending/run/t4110-new.scala index 24ecd66cc..47d210321 100644 --- a/tests/pending/run/t4110-new.scala +++ b/tests/pending/run/t4110-new.scala @@ -10,4 +10,4 @@ object Test extends App { val name = new A with B inferredType(name) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t4110-old.scala b/tests/pending/run/t4110-old.scala index a42646ce5..6022285e9 100644 --- a/tests/pending/run/t4110-old.scala +++ b/tests/pending/run/t4110-old.scala @@ -8,4 +8,4 @@ object Test extends App { val name = new A with B inferredType(name) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t4147.scala b/tests/pending/run/t4147.scala index c1e2d746a..c638ab50a 100644 --- a/tests/pending/run/t4147.scala +++ b/tests/pending/run/t4147.scala @@ -7,19 +7,19 @@ import scala.collection._ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { checkElementsAreSorted() checkRangedImpl() } - def checkElementsAreSorted() { + def checkElementsAreSorted(): Unit = { val tree = mutable.SortedSet[Int]() tree ++= List(4, 3, 1, 6, 7, 5, 2) assert(tree == immutable.SortedSet(1, 2, 3, 4, 5, 6, 7)) assert(tree.size == 7) } - def checkRangedImpl() { + def checkRangedImpl(): Unit = { val tree = mutable.SortedSet[Int](3, 1, 6, 7, 5, 2) val projection = tree.rangeImpl(Some(3), Some(6)) assert(projection == immutable.SortedSet(3, 5)) diff --git a/tests/pending/run/t4396.scala b/tests/pending/run/t4396.scala index d67eaa378..2877a5f1d 100644 --- a/tests/pending/run/t4396.scala +++ b/tests/pending/run/t4396.scala @@ -1,6 +1,6 @@ // #43896 trait M extends DelayedInit { - def delayedInit(body : => Unit) { + def delayedInit(body : => Unit): Unit = { println("hallo") body println("bye") @@ -16,7 +16,7 @@ class C(init : Int) extends M { // #4380 object Main { - def main(argv: Array[String]) { + def main(argv: Array[String]): Unit = { class Bip { class Foo { override def toString() = "foo" } object Main extends App { diff --git a/tests/pending/run/t4398.scala b/tests/pending/run/t4398.scala index 87dc870af..5e152f727 100644 --- a/tests/pending/run/t4398.scala +++ b/tests/pending/run/t4398.scala @@ -3,7 +3,7 @@ import scala.language.{ postfixOps } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val x = 1 to 10 toSet val y = x + 5 val z = y - 154321 diff --git a/tests/pending/run/t4415.scala b/tests/pending/run/t4415.scala index caf1609b9..33d390869 100644 --- a/tests/pending/run/t4415.scala +++ b/tests/pending/run/t4415.scala @@ -12,7 +12,7 @@ */ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { convert(new SubclassProperty) } @@ -83,4 +83,4 @@ object SecondMatch { def apply(prop: MyProp[String]) : SecondProperty = { new SecondProperty() } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t4459.scala b/tests/pending/run/t4459.scala index 6e1b871cb..ea3b7420b 100644 --- a/tests/pending/run/t4459.scala +++ b/tests/pending/run/t4459.scala @@ -1,7 +1,7 @@ import collection._ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { for (i <- 0 until 2000) { foo((0 until 10000).toSeq.par) } diff --git a/tests/pending/run/t4461.scala b/tests/pending/run/t4461.scala index 1801a653e..0fd82265b 100644 --- a/tests/pending/run/t4461.scala +++ b/tests/pending/run/t4461.scala @@ -4,7 +4,7 @@ import scala.collection.script._ // #4461 object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val buf = new ArrayBuffer[Int] with ObservableBuffer[Int] buf.subscribe(new Subscriber[Message[Int], ObservableBuffer[Int]] { def notify(pub: ObservableBuffer[Int], event: Message[Int]) = println(event) diff --git a/tests/pending/run/t4535.scala b/tests/pending/run/t4535.scala index 91c13a28c..37aacb0ad 100644 --- a/tests/pending/run/t4535.scala +++ b/tests/pending/run/t4535.scala @@ -6,7 +6,7 @@ import collection._ // #4535 object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val as = new mutable.ArrayStack[Int] as push 1 as push 2 diff --git a/tests/pending/run/t4560.scala b/tests/pending/run/t4560.scala index ee657e47e..1008bdf7b 100644 --- a/tests/pending/run/t4560.scala +++ b/tests/pending/run/t4560.scala @@ -56,11 +56,11 @@ trait B3 { } object Test3 extends B3 { - def test { fail() } + def test: Unit = { fail() } } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { Test1.fail() Test2.fail() Test3.fail() diff --git a/tests/pending/run/t4560b.scala b/tests/pending/run/t4560b.scala index 97fe00ce3..355936ae3 100644 --- a/tests/pending/run/t4560b.scala +++ b/tests/pending/run/t4560b.scala @@ -12,10 +12,10 @@ object Outer { object Outer2 { abstract class A5 private[Outer2] trait C5 { - def impl() { println("SUCCESS") } + def impl(): Unit = { println("SUCCESS") } } trait B5 extends C5 { self: A5 => - def fail() { impl() } + def fail(): Unit = { impl() } } object Test5 extends A5 with B5 with C5 } diff --git a/tests/pending/run/t4565_1.scala b/tests/pending/run/t4565_1.scala index 135335557..19b26b24e 100644 --- a/tests/pending/run/t4565_1.scala +++ b/tests/pending/run/t4565_1.scala @@ -7,8 +7,8 @@ trait T { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val t = new T{} println(t.foo) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t4577.scala b/tests/pending/run/t4577.scala index b08100d3e..2859e5098 100644 --- a/tests/pending/run/t4577.scala +++ b/tests/pending/run/t4577.scala @@ -35,4 +35,4 @@ object Test { // `syms map g` should be: 1 2 3 assert(syms forall (s => g(s) == gDirect(s))) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t4601.scala b/tests/pending/run/t4601.scala index fe4063484..300da58b2 100644 --- a/tests/pending/run/t4601.scala +++ b/tests/pending/run/t4601.scala @@ -3,13 +3,13 @@ class A trait B { self: A => - def test { + def test: Unit = { println('blubber) } } object Test extends A with B { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { test } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t4608.scala b/tests/pending/run/t4608.scala index 9ffcb0f3f..34586e2d0 100644 --- a/tests/pending/run/t4608.scala +++ b/tests/pending/run/t4608.scala @@ -1,7 +1,7 @@ // #4608 object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { ((1 to 100) sliding 10).toList.par.map{_.map{i => i * i}}.flatten } diff --git a/tests/pending/run/t4617.scala b/tests/pending/run/t4617.scala index 2fea5e29e..3d0548160 100644 --- a/tests/pending/run/t4617.scala +++ b/tests/pending/run/t4617.scala @@ -1,5 +1,5 @@ object Test { - def f1 = new { def f { lazy val d = 0d } } + def f1 = new { def f: Unit = { lazy val d = 0d } } def f2 = { lazy val d = 4D lazy val f = 4f diff --git a/tests/pending/run/t4658.scala b/tests/pending/run/t4658.scala index 8c07c5069..d9fe86f82 100644 --- a/tests/pending/run/t4658.scala +++ b/tests/pending/run/t4658.scala @@ -19,7 +19,7 @@ object Test { def numericBigIntRanges = rangeData.map(r => if (r.inclusive) NumericRange.inclusive(BigInt(r.start), BigInt(r.end), BigInt(r.step)) else NumericRange(BigInt(r.start), BigInt(r.end), BigInt(r.step))) - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println("Ranges:") ranges.foreach{range => println(range.sum)} println("IntRanges:") @@ -30,4 +30,4 @@ object Test { numericBigIntRanges.foreach{range => println(range.sum)} } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t4680.scala b/tests/pending/run/t4680.scala index d5c8d0e7a..927eac155 100644 --- a/tests/pending/run/t4680.scala +++ b/tests/pending/run/t4680.scala @@ -44,7 +44,7 @@ class E() extends D() { object Test { def p(msg: String) = println("\n\n// " + msg) - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { p("new C { }") new C { } p("new C { 5 }") @@ -57,15 +57,35 @@ object Test { p("new D() { val x = 5 }") new D() { val x = 5 } p("new { val x = 5 } with D()") - new { val x = 5 } with D() + new D() { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val x = 5 +// END copied early initializers +} p("new E() { val x = 5 }") new E() { val x = 5 } p("new { val x = 5 } with E()") - new { val x = 5 } with E() + new E() { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val x = 5 +// END copied early initializers +} p("new { val x = 5 } with E() { }") - new { val x = 5 } with E() { } + new E() { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val x = 5 +// END copied early initializers + } p("new { val x = 5 } with E() { 5 }") - new { val x = 5 } with E() { 5 } + new E() { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val x = 5 +// END copied early initializers + 5 } } } diff --git a/tests/pending/run/t4709.scala b/tests/pending/run/t4709.scala index c61a44039..29d0dac61 100644 --- a/tests/pending/run/t4709.scala +++ b/tests/pending/run/t4709.scala @@ -4,7 +4,7 @@ import collection.GenSeq object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val Seq(1, 2) = Stream(1, 2) } } diff --git a/tests/pending/run/t4723.scala b/tests/pending/run/t4723.scala index 4278ff9aa..462d0be43 100644 --- a/tests/pending/run/t4723.scala +++ b/tests/pending/run/t4723.scala @@ -2,7 +2,7 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { assert(Nil == collection.parallel.ParSeq()) assert(collection.parallel.ParSeq() == Nil) } diff --git a/tests/pending/run/t4761.scala b/tests/pending/run/t4761.scala index e4bd87cb1..c9d8576ab 100644 --- a/tests/pending/run/t4761.scala +++ b/tests/pending/run/t4761.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val gs = for (x <- (1 to 5)) yield { if (x % 2 == 0) List(1).seq else List(1).par } println(gs.flatten) println(gs.transpose) diff --git a/tests/pending/run/t4794.scala b/tests/pending/run/t4794.scala index 720906f50..5806cae49 100644 --- a/tests/pending/run/t4794.scala +++ b/tests/pending/run/t4794.scala @@ -1,8 +1,8 @@ trait Mutable[@specialized A] { def a: A; def a_=(a0: A): Unit } trait NotSpecialized { } class Arr[@specialized A](val arr: Array[A]) { - def bippy(m: Mutable[A]) { m.a = arr(0) } - def quux(m: Mutable[A] with NotSpecialized) { m.a = arr(0) } + def bippy(m: Mutable[A]): Unit = { m.a = arr(0) } + def quux(m: Mutable[A] with NotSpecialized): Unit = { m.a = arr(0) } } object Test { diff --git a/tests/pending/run/t4809.scala b/tests/pending/run/t4809.scala index 4b721d111..9c6645805 100644 --- a/tests/pending/run/t4809.scala +++ b/tests/pending/run/t4809.scala @@ -6,7 +6,7 @@ import scala.util.control.Breaks._ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val x = tryBreakable { break 2 diff --git a/tests/pending/run/t4859.scala b/tests/pending/run/t4859.scala index 3c20cea98..8b354ca94 100644 --- a/tests/pending/run/t4859.scala +++ b/tests/pending/run/t4859.scala @@ -7,14 +7,14 @@ object Outer { println("Outer") object Inner { println("Inner") - def i { + def i: Unit = { println("Inner.i") } } } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { Outer.Inner.i // we still don't initialize Outer here (but should we?) {println("About to reference Inner.i"); Outer}.Inner.i // Outer will be initialized. diff --git a/tests/pending/run/t4894.scala b/tests/pending/run/t4894.scala index 2b70da141..b2d915fda 100644 --- a/tests/pending/run/t4894.scala +++ b/tests/pending/run/t4894.scala @@ -5,7 +5,7 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { import collection._ val hs = mutable.HashSet[Int]() hs ++= 1 to 10 diff --git a/tests/pending/run/t4895.scala b/tests/pending/run/t4895.scala index 3842f8a38..fdd091511 100644 --- a/tests/pending/run/t4895.scala +++ b/tests/pending/run/t4895.scala @@ -1,12 +1,12 @@ object Test { - def checkPar(sz: Int) { + def checkPar(sz: Int): Unit = { import collection._ val hs = mutable.HashSet[Int]() ++ (1 to sz) assert(hs.par.map(_ + 1).seq.toSeq.sorted == (2 to (sz + 1))) } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { for (i <- 0 until 100) checkPar(i) for (i <- 100 until 1000 by 50) checkPar(i) for (i <- 1000 until 10000 by 500) checkPar(i) diff --git a/tests/pending/run/t4897.scala b/tests/pending/run/t4897.scala index a2ec3de37..f65c2745e 100644 --- a/tests/pending/run/t4897.scala +++ b/tests/pending/run/t4897.scala @@ -7,4 +7,4 @@ class C extends CSuper { object Test extends C with App { println(f) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t4954.scala b/tests/pending/run/t4954.scala index f0bb1cc02..655a90f74 100644 --- a/tests/pending/run/t4954.scala +++ b/tests/pending/run/t4954.scala @@ -5,7 +5,7 @@ import collection._ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val m = scala.collection.mutable.LinkedHashMap("one" -> 1, "two" -> 2, "three" -> 3, "four" -> 4, "five" -> 5) val expected = List("one", "two", "three", "four", "five") assert(m.keys.iterator.toList == expected) diff --git a/tests/pending/run/t4996.scala b/tests/pending/run/t4996.scala index 8a38e7fe7..e8ef5949c 100644 --- a/tests/pending/run/t4996.scala +++ b/tests/pending/run/t4996.scala @@ -5,19 +5,19 @@ trait A[@specialized(Int) T] { - def foo(t: T) + def foo(t: T): Unit } trait B extends A[Int] { - def foo(t: Int) { + def foo(t: Int): Unit = { println("B.foo") } } trait M extends B { - abstract override def foo(t: Int) { + abstract override def foo(t: Int): Unit = { super.foo(t) println("M.foo") } @@ -28,7 +28,7 @@ object C extends B with M object D extends B { - override def foo(t: Int) { + override def foo(t: Int): Unit = { super.foo(t) println("M.foo") } @@ -37,7 +37,7 @@ object D extends B { object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { D.foo(42) // OK, prints B.foo M.foo C.foo(42) // was StackOverflowError } diff --git a/tests/pending/run/t5018.scala b/tests/pending/run/t5018.scala index 70bd6c52e..147d69cf8 100644 --- a/tests/pending/run/t5018.scala +++ b/tests/pending/run/t5018.scala @@ -16,7 +16,7 @@ object Test { in.readObject.asInstanceOf[T] } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val values = mutable.Map(1 -> 1).values assert(serializeDeserialize(values).toList == values.toList) diff --git a/tests/pending/run/t5037.scala b/tests/pending/run/t5037.scala index 7b1fce7a8..c64aa2814 100644 --- a/tests/pending/run/t5037.scala +++ b/tests/pending/run/t5037.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val t = new Test t.inner.foo() } @@ -7,7 +7,7 @@ object Test { class Test { class Inner { - def foo() { + def foo(): Unit = { println(bar) bar = false println(bar) diff --git a/tests/pending/run/t5080.scala b/tests/pending/run/t5080.scala index acb6167f4..4099ba6f1 100644 --- a/tests/pending/run/t5080.scala +++ b/tests/pending/run/t5080.scala @@ -11,7 +11,7 @@ object Test extends App { override def toString = value.toString; } - implicit def conversions(x: Value) = new { + implicit def conversions(x: Value): AnyRef{def toInt: Int} = new { def toInt = x match { case Num(n) => n diff --git a/tests/pending/run/t5105.scala b/tests/pending/run/t5105.scala index f5a9a3c4d..9de714c87 100644 --- a/tests/pending/run/t5105.scala +++ b/tests/pending/run/t5105.scala @@ -1,12 +1,12 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new foo.Bar println("You buttered your bread. Now sleep in it!") } } package foo { - trait Foo { def foo() {} } + trait Foo { def foo(): Unit = {} } class Bar extends Baz with Foo abstract class Baz diff --git a/tests/pending/run/t5125.scala b/tests/pending/run/t5125.scala index 7ec2b929d..21de47f87 100644 --- a/tests/pending/run/t5125.scala +++ b/tests/pending/run/t5125.scala @@ -13,7 +13,7 @@ object O2 { } object Test extends App { - def check(c: Class[_]) { + def check(c: Class[_]): Unit = { val methodName = "f" val methods = c.getDeclaredMethods.filter(_.getName == methodName) println(methods.map(_.toString).sorted.mkString("\n")) @@ -21,4 +21,4 @@ object Test extends App { check(O1.getClass) check(O2.getClass) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5125b.scala b/tests/pending/run/t5125b.scala index 149c49e21..5a77e311a 100644 --- a/tests/pending/run/t5125b.scala +++ b/tests/pending/run/t5125b.scala @@ -24,7 +24,7 @@ class C4 { } object Test extends App { - def check(c: Class[_]) { + def check(c: Class[_]): Unit = { val methodName = "f" val methods = c.getDeclaredMethods.filter(_.getName == methodName) println(methods.map(_.toString).sorted.mkString("\n")) diff --git a/tests/pending/run/t5158.scala b/tests/pending/run/t5158.scala index 3028ffa9e..34c02c306 100644 --- a/tests/pending/run/t5158.scala +++ b/tests/pending/run/t5158.scala @@ -1,11 +1,11 @@ case class B(var x: Int) { - def succ() { + def succ(): Unit = { x = x + 1 } } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val b = B(0) b match { case B(x) => @@ -14,4 +14,4 @@ object Test { println(x) } } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5162.scala b/tests/pending/run/t5162.scala index 4f91932b6..e4ad9ff8d 100644 --- a/tests/pending/run/t5162.scala +++ b/tests/pending/run/t5162.scala @@ -13,7 +13,7 @@ object O2 { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new O2.Derived().foo } } diff --git a/tests/pending/run/t5224.scala b/tests/pending/run/t5224.scala index 600a4200b..5e92d4e04 100644 --- a/tests/pending/run/t5224.scala +++ b/tests/pending/run/t5224.scala @@ -5,4 +5,4 @@ class Foo(bar: String) extends annotation.ClassfileAnnotation object Test extends App { val tree = reify{@Foo(bar = "qwe") class C}.tree println(tree.toString) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5225_1.scala b/tests/pending/run/t5225_1.scala index 917a239bd..68134ea14 100644 --- a/tests/pending/run/t5225_1.scala +++ b/tests/pending/run/t5225_1.scala @@ -3,4 +3,4 @@ import scala.reflect.runtime.universe._ object Test extends App { val tree = reify{@transient @volatile var x = 2}.tree println(tree.toString) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5225_2.scala b/tests/pending/run/t5225_2.scala index cf0f23a5c..30f08d640 100644 --- a/tests/pending/run/t5225_2.scala +++ b/tests/pending/run/t5225_2.scala @@ -3,4 +3,4 @@ import scala.reflect.runtime.universe._ object Test extends App { val tree = reify{def foo(@annotation.elidable(0) x: Int) = ""}.tree println(tree.toString) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5229_1.scala b/tests/pending/run/t5229_1.scala index 7e05b0834..218b0e867 100644 --- a/tests/pending/run/t5229_1.scala +++ b/tests/pending/run/t5229_1.scala @@ -5,4 +5,4 @@ object Test extends App { reify { object C }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5229_2.scala b/tests/pending/run/t5229_2.scala index f059b0977..39ee15666 100644 --- a/tests/pending/run/t5229_2.scala +++ b/tests/pending/run/t5229_2.scala @@ -15,4 +15,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5230.scala b/tests/pending/run/t5230.scala index f6a7817c0..3b5b7c24b 100644 --- a/tests/pending/run/t5230.scala +++ b/tests/pending/run/t5230.scala @@ -15,4 +15,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5256a.scala b/tests/pending/run/t5256a.scala index c8cea5302..5f8a10575 100644 --- a/tests/pending/run/t5256a.scala +++ b/tests/pending/run/t5256a.scala @@ -8,4 +8,4 @@ object Test extends App { println(c) println(c.fullName) println(c.info) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5256b.scala b/tests/pending/run/t5256b.scala index 5cd172e03..769d133b3 100644 --- a/tests/pending/run/t5256b.scala +++ b/tests/pending/run/t5256b.scala @@ -7,4 +7,4 @@ object Test extends App { println(c) println(c.fullName) println(c.info) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5256c.scala b/tests/pending/run/t5256c.scala index 66ddd3df5..6ef0cf958 100644 --- a/tests/pending/run/t5256c.scala +++ b/tests/pending/run/t5256c.scala @@ -9,4 +9,4 @@ object Test extends App { println(c.fullName) println(c.info) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5256e.scala b/tests/pending/run/t5256e.scala index 2f57ea68b..cf5be9a9a 100644 --- a/tests/pending/run/t5256e.scala +++ b/tests/pending/run/t5256e.scala @@ -7,4 +7,4 @@ object Test extends App { println(c) println(c.fullName) println(c.info) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5258a.scala b/tests/pending/run/t5258a.scala index 1b98b5920..4eaa0a58d 100644 --- a/tests/pending/run/t5258a.scala +++ b/tests/pending/run/t5258a.scala @@ -5,4 +5,4 @@ object Test extends App { reify { println(classOf[Int]) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5262.scala b/tests/pending/run/t5262.scala index 67448442d..fd194e90a 100644 --- a/tests/pending/run/t5262.scala +++ b/tests/pending/run/t5262.scala @@ -7,7 +7,7 @@ object Test { - def serializationDeserialization(obj : Any) { + def serializationDeserialization(obj : Any): Unit = { val bos = new java.io.ByteArrayOutputStream() val out = new java.io.ObjectOutputStream(bos) out.writeObject(obj) @@ -18,7 +18,7 @@ object Test { println(o) } - def main(args : Array[String]) { + def main(args : Array[String]): Unit = { serializationDeserialization(List(1,2,3,4)) serializationDeserialization(List(1,2,null,4)) } diff --git a/tests/pending/run/t5266_1.scala b/tests/pending/run/t5266_1.scala index 7bf73ac98..df94bda3d 100644 --- a/tests/pending/run/t5266_1.scala +++ b/tests/pending/run/t5266_1.scala @@ -12,4 +12,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5266_2.scala b/tests/pending/run/t5266_2.scala index 9b33910d0..a876aa384 100644 --- a/tests/pending/run/t5266_2.scala +++ b/tests/pending/run/t5266_2.scala @@ -13,4 +13,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5269.scala b/tests/pending/run/t5269.scala index dfdabdd6c..bede89aa0 100644 --- a/tests/pending/run/t5269.scala +++ b/tests/pending/run/t5269.scala @@ -13,4 +13,4 @@ object Test extends App { new X().println() }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5270.scala b/tests/pending/run/t5270.scala index afd45a087..6dc0cd898 100644 --- a/tests/pending/run/t5270.scala +++ b/tests/pending/run/t5270.scala @@ -17,4 +17,4 @@ object Test extends App { new X().println() }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5271_1.scala b/tests/pending/run/t5271_1.scala index 9e2c7602b..5c7b2607b 100644 --- a/tests/pending/run/t5271_1.scala +++ b/tests/pending/run/t5271_1.scala @@ -12,4 +12,4 @@ object Test extends App { val toolbox = cm.mkToolBox() println(code.tree) println(code.eval) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5271_2.scala b/tests/pending/run/t5271_2.scala index 430738f4f..12073b3b9 100644 --- a/tests/pending/run/t5271_2.scala +++ b/tests/pending/run/t5271_2.scala @@ -14,4 +14,4 @@ object Test extends App { val toolbox = cm.mkToolBox() println(code.tree) println(code.eval) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5271_3.scala b/tests/pending/run/t5271_3.scala index f2ca2d496..d05f4e5f4 100644 --- a/tests/pending/run/t5271_3.scala +++ b/tests/pending/run/t5271_3.scala @@ -15,4 +15,4 @@ object Test extends App { val toolbox = cm.mkToolBox() println(code.tree) println(code.eval) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5271_4.scala b/tests/pending/run/t5271_4.scala index f63e82bdb..a1519b713 100644 --- a/tests/pending/run/t5271_4.scala +++ b/tests/pending/run/t5271_4.scala @@ -5,4 +5,4 @@ object Test extends App { reify { case object C }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5272_1_newpatmat.scala b/tests/pending/run/t5272_1_newpatmat.scala index e8bb01324..5a3cf2abb 100644 --- a/tests/pending/run/t5272_1_newpatmat.scala +++ b/tests/pending/run/t5272_1_newpatmat.scala @@ -8,4 +8,4 @@ object Test extends App { case _ => println("not okay") } }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5272_1_oldpatmat.scala b/tests/pending/run/t5272_1_oldpatmat.scala index e8bb01324..5a3cf2abb 100644 --- a/tests/pending/run/t5272_1_oldpatmat.scala +++ b/tests/pending/run/t5272_1_oldpatmat.scala @@ -8,4 +8,4 @@ object Test extends App { case _ => println("not okay") } }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5272_2_newpatmat.scala b/tests/pending/run/t5272_2_newpatmat.scala index be79cde18..cb9037ca8 100644 --- a/tests/pending/run/t5272_2_newpatmat.scala +++ b/tests/pending/run/t5272_2_newpatmat.scala @@ -7,4 +7,4 @@ object Test extends App { case x => println("okay" + x) } }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5272_2_oldpatmat.scala b/tests/pending/run/t5272_2_oldpatmat.scala index be79cde18..cb9037ca8 100644 --- a/tests/pending/run/t5272_2_oldpatmat.scala +++ b/tests/pending/run/t5272_2_oldpatmat.scala @@ -7,4 +7,4 @@ object Test extends App { case x => println("okay" + x) } }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5273_1_newpatmat.scala b/tests/pending/run/t5273_1_newpatmat.scala index 756f52e10..8eec4de27 100644 --- a/tests/pending/run/t5273_1_newpatmat.scala +++ b/tests/pending/run/t5273_1_newpatmat.scala @@ -8,4 +8,4 @@ object Test extends App { case _ => println("this is getting out of hand!") } }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5273_1_oldpatmat.scala b/tests/pending/run/t5273_1_oldpatmat.scala index 756f52e10..8eec4de27 100644 --- a/tests/pending/run/t5273_1_oldpatmat.scala +++ b/tests/pending/run/t5273_1_oldpatmat.scala @@ -8,4 +8,4 @@ object Test extends App { case _ => println("this is getting out of hand!") } }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5273_2a_newpatmat.scala b/tests/pending/run/t5273_2a_newpatmat.scala index c0d15496a..03bf3da81 100644 --- a/tests/pending/run/t5273_2a_newpatmat.scala +++ b/tests/pending/run/t5273_2a_newpatmat.scala @@ -6,4 +6,4 @@ object Test extends App { val foo :: bar :: _ = List(1, 2, 3) println(foo * bar) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5273_2a_oldpatmat.scala b/tests/pending/run/t5273_2a_oldpatmat.scala index c0d15496a..03bf3da81 100644 --- a/tests/pending/run/t5273_2a_oldpatmat.scala +++ b/tests/pending/run/t5273_2a_oldpatmat.scala @@ -6,4 +6,4 @@ object Test extends App { val foo :: bar :: _ = List(1, 2, 3) println(foo * bar) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5273_2b_newpatmat.scala b/tests/pending/run/t5273_2b_newpatmat.scala index 31afd7e2b..2a5ec7752 100644 --- a/tests/pending/run/t5273_2b_newpatmat.scala +++ b/tests/pending/run/t5273_2b_newpatmat.scala @@ -7,4 +7,4 @@ object Test extends App { val RegexParser(name, shortname, value) = "American Dollar 1USD | 2,8567 | sometext" println("name = %s, shortname = %s, value = %s".format(name, shortname, value)) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5273_2b_oldpatmat.scala b/tests/pending/run/t5273_2b_oldpatmat.scala index 31afd7e2b..2a5ec7752 100644 --- a/tests/pending/run/t5273_2b_oldpatmat.scala +++ b/tests/pending/run/t5273_2b_oldpatmat.scala @@ -7,4 +7,4 @@ object Test extends App { val RegexParser(name, shortname, value) = "American Dollar 1USD | 2,8567 | sometext" println("name = %s, shortname = %s, value = %s".format(name, shortname, value)) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5274_1.scala b/tests/pending/run/t5274_1.scala index c1b842fd7..00de442a9 100644 --- a/tests/pending/run/t5274_1.scala +++ b/tests/pending/run/t5274_1.scala @@ -11,4 +11,4 @@ object Test extends App { println("49! = " + f49) println("50!/49! = " + (f50 / f49)) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5274_2.scala b/tests/pending/run/t5274_2.scala index 17e3976c0..867f33c33 100644 --- a/tests/pending/run/t5274_2.scala +++ b/tests/pending/run/t5274_2.scala @@ -7,13 +7,13 @@ object Test extends App { * visible in their scope (including local variables or * arguments of enclosing methods). */ - def sort(a: Array[Int]) { + def sort(a: Array[Int]): Unit = { - def swap(i: Int, j: Int) { + def swap(i: Int, j: Int): Unit = { val t = a(i); a(i) = a(j); a(j) = t } - def sort1(l: Int, r: Int) { + def sort1(l: Int, r: Int): Unit = { val pivot = a((l + r) / 2) var i = l var j = r @@ -34,7 +34,7 @@ object Test extends App { sort1(0, a.length - 1) } - def println(ar: Array[Int]) { + def println(ar: Array[Int]): Unit = { def print1 = { def iter(i: Int): String = ar(i) + (if (i < ar.length-1) "," + iter(i+1) else "") @@ -48,4 +48,4 @@ object Test extends App { sort(ar) println(ar) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5275.scala b/tests/pending/run/t5275.scala index 5c84df499..a749c57c8 100644 --- a/tests/pending/run/t5275.scala +++ b/tests/pending/run/t5275.scala @@ -6,4 +6,4 @@ object Test extends App { class C(val foo: Int) println(new C(2).foo) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5276_1a.scala b/tests/pending/run/t5276_1a.scala index 7f4b6ecb8..3173fb1dd 100644 --- a/tests/pending/run/t5276_1a.scala +++ b/tests/pending/run/t5276_1a.scala @@ -6,4 +6,4 @@ object Test extends App { lazy val x = 2 println(x) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5276_1b.scala b/tests/pending/run/t5276_1b.scala index 56e7dc1bf..d2e194567 100644 --- a/tests/pending/run/t5276_1b.scala +++ b/tests/pending/run/t5276_1b.scala @@ -6,4 +6,4 @@ object Test extends App { implicit lazy val x = 2 println(implicitly[Int]) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5276_2a.scala b/tests/pending/run/t5276_2a.scala index af9272c69..dbb263314 100644 --- a/tests/pending/run/t5276_2a.scala +++ b/tests/pending/run/t5276_2a.scala @@ -9,4 +9,4 @@ object Test extends App { println(new C().x) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5276_2b.scala b/tests/pending/run/t5276_2b.scala index b211901ab..9cc789ec2 100644 --- a/tests/pending/run/t5276_2b.scala +++ b/tests/pending/run/t5276_2b.scala @@ -10,4 +10,4 @@ object Test extends App { println(new C().y) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5277_2.scala b/tests/pending/run/t5277_2.scala index dd72452a7..f045312a3 100644 --- a/tests/pending/run/t5277_2.scala +++ b/tests/pending/run/t5277_2.scala @@ -9,4 +9,4 @@ object Test extends App { println(p) println(p(1)) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5279.scala b/tests/pending/run/t5279.scala index 815c88373..3688efaac 100644 --- a/tests/pending/run/t5279.scala +++ b/tests/pending/run/t5279.scala @@ -5,4 +5,4 @@ object Test extends App { reify { println(new Integer(10)) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5284.scala b/tests/pending/run/t5284.scala index ba0845fb8..cf5c0608b 100644 --- a/tests/pending/run/t5284.scala +++ b/tests/pending/run/t5284.scala @@ -8,7 +8,7 @@ * safely cast `T` to `W` whenever type bounds on `W` hold. */ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val a = Blarg(Array(1, 2, 3)) println(a.m((x: Int) => x + 1)) } diff --git a/tests/pending/run/t5284b.scala b/tests/pending/run/t5284b.scala index 0da797249..7f905143e 100644 --- a/tests/pending/run/t5284b.scala +++ b/tests/pending/run/t5284b.scala @@ -9,7 +9,7 @@ * safely cast `W` to `T` whenever typebounds of `W` hold. */ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val foo = Foo.createUnspecialized[Int] println(foo.bar(17)) } diff --git a/tests/pending/run/t5284c.scala b/tests/pending/run/t5284c.scala index dec743fb9..8a20343a4 100644 --- a/tests/pending/run/t5284c.scala +++ b/tests/pending/run/t5284c.scala @@ -11,7 +11,7 @@ * bounds hold. */ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val foo = Foo.createUnspecialized[Int] println(foo.bar(List(1, 2, 3))) } diff --git a/tests/pending/run/t5334_1.scala b/tests/pending/run/t5334_1.scala index 3aeb7e443..537187f88 100644 --- a/tests/pending/run/t5334_1.scala +++ b/tests/pending/run/t5334_1.scala @@ -12,4 +12,4 @@ object Test extends App { val toolbox = cm.mkToolBox() println(toolbox.eval(code.tree)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5334_2.scala b/tests/pending/run/t5334_2.scala index 64ee1e0ac..0246dc31b 100644 --- a/tests/pending/run/t5334_2.scala +++ b/tests/pending/run/t5334_2.scala @@ -12,4 +12,4 @@ object Test extends App { val toolbox = cm.mkToolBox() println(toolbox.eval(code.tree)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5335.scala b/tests/pending/run/t5335.scala index 714846de2..3405ce003 100644 --- a/tests/pending/run/t5335.scala +++ b/tests/pending/run/t5335.scala @@ -5,4 +5,4 @@ object Test extends App { reify { println(new {def x = 2}.x) }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5380.scala b/tests/pending/run/t5380.scala index 66d12a0ca..a5f793c1d 100644 --- a/tests/pending/run/t5380.scala +++ b/tests/pending/run/t5380.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val f = () => return try { 1 } catch { case _: Throwable => 0 } f() } diff --git a/tests/pending/run/t5394.scala b/tests/pending/run/t5394.scala index 1b39da3ac..12bae597c 100644 --- a/tests/pending/run/t5394.scala +++ b/tests/pending/run/t5394.scala @@ -1,4 +1,4 @@ object Test extends App { def f[T](l: List[T]): Int = l match { case x :: xs => f(xs) case Nil => 0 } f(List.fill(10000)(0)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5407.scala b/tests/pending/run/t5407.scala index 35a8ec6a4..f86e04e6f 100644 --- a/tests/pending/run/t5407.scala +++ b/tests/pending/run/t5407.scala @@ -14,4 +14,4 @@ object Test extends App { case Foo(x, None, z) => 0 } println(bar(x)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5418.scala b/tests/pending/run/t5418.scala index e3cb20cf8..f1ebe8fb3 100644 --- a/tests/pending/run/t5418.scala +++ b/tests/pending/run/t5418.scala @@ -5,4 +5,4 @@ object Test extends App { reify { new Object().getClass }.eval -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5418a.scala b/tests/pending/run/t5418a.scala index 90bc542be..a9c9204aa 100644 --- a/tests/pending/run/t5418a.scala +++ b/tests/pending/run/t5418a.scala @@ -1,3 +1,3 @@ object Test extends App { println(scala.reflect.runtime.universe.reify(new Object().getClass)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5418b.scala b/tests/pending/run/t5418b.scala index c6172613d..f74730e46 100644 --- a/tests/pending/run/t5418b.scala +++ b/tests/pending/run/t5418b.scala @@ -8,4 +8,4 @@ object Test extends App { val typed = tb.typecheck(untyped) println(typed) println(showRaw(typed.tpe)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5419.scala b/tests/pending/run/t5419.scala index 686a79baf..d8ca28640 100644 --- a/tests/pending/run/t5419.scala +++ b/tests/pending/run/t5419.scala @@ -5,4 +5,4 @@ class Foo extends annotation.StaticAnnotation object Test extends App { val tree = reify{(5: @Foo).asInstanceOf[Int]}.tree println(tree.toString) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5423.scala b/tests/pending/run/t5423.scala index c1632126b..eab029b30 100644 --- a/tests/pending/run/t5423.scala +++ b/tests/pending/run/t5423.scala @@ -8,4 +8,4 @@ final class table extends annotation.StaticAnnotation object Test extends App { val s = cm.classSymbol(classOf[A]) println(s.annotations) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5428.scala b/tests/pending/run/t5428.scala index 44003e06b..697dcbf5c 100644 --- a/tests/pending/run/t5428.scala +++ b/tests/pending/run/t5428.scala @@ -12,7 +12,7 @@ class A extends StackProxy[Int] { object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val a = new A a push 3 diff --git a/tests/pending/run/t5488-fn.scala b/tests/pending/run/t5488-fn.scala index e6efe176c..b744017d7 100644 --- a/tests/pending/run/t5488-fn.scala +++ b/tests/pending/run/t5488-fn.scala @@ -2,7 +2,7 @@ class B[@specialized(Int, AnyRef, Unit) A, @specialized(Int, AnyRef, Unit) B](f: class C[@specialized(Int, AnyRef) A, @specialized(Int, AnyRef) B, @specialized(Int, AnyRef) C](f: (A, B) => C) object Test { - def main(args:Array[String]) { + def main(args:Array[String]): Unit = { def show(x: Any) = println(x.getClass.getName) show(new B((x: Int) => 1)) diff --git a/tests/pending/run/t5488.scala b/tests/pending/run/t5488.scala index f93cf2906..e0315f0b8 100644 --- a/tests/pending/run/t5488.scala +++ b/tests/pending/run/t5488.scala @@ -3,7 +3,7 @@ class B0[@specialized(Int, AnyRef) A, @specialized(Int, AnyRef) B]() class C0[@specialized(Int, AnyRef) A, @specialized(Int, AnyRef) B, @specialized(Int, AnyRef) C]() object Test { - def main(args:Array[String]) { + def main(args:Array[String]): Unit = { def show(x: Any) = println(x.getClass.getName) show(new A0[Int]()) diff --git a/tests/pending/run/t5500.scala b/tests/pending/run/t5500.scala index 6fbe168a5..881a83ca9 100644 --- a/tests/pending/run/t5500.scala +++ b/tests/pending/run/t5500.scala @@ -5,7 +5,7 @@ class C1[@spec(Int, AnyRef) A, @spec(Int, AnyRef) B](v:A, w:B) class C2[@spec(Unit, Boolean, Byte, Char, Short, Int, Long, Float, Double, AnyRef) A, @spec(Unit, Boolean, Byte, Char, Short, Int, Long, Float, Double, AnyRef) B](v:A, w:B) object Test { - def main(args:Array[String]) { + def main(args:Array[String]): Unit = { println(new C1("abc", 123).getClass.getName) println(new C2[String, Int]("abc", 123).getClass.getName) } diff --git a/tests/pending/run/t5500b.scala b/tests/pending/run/t5500b.scala index 9a49624fd..0d8edc094 100644 --- a/tests/pending/run/t5500b.scala +++ b/tests/pending/run/t5500b.scala @@ -16,7 +16,7 @@ class C1C[ ](v:A, w:B) object Test { - def main(args:Array[String]) { + def main(args:Array[String]): Unit = { println(new C1A[String, Int].getClass.getName) println(new C1A[String, Double].getClass.getName) println(new C1A[String, String].getClass.getName) diff --git a/tests/pending/run/t5530.scala b/tests/pending/run/t5530.scala index c8109a400..5fc0df54f 100644 --- a/tests/pending/run/t5530.scala +++ b/tests/pending/run/t5530.scala @@ -1,4 +1,4 @@ object Test extends App { println(s"""something like this ${3+4} now works!.""") -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5532.scala b/tests/pending/run/t5532.scala index 75004730b..ab51fb319 100644 --- a/tests/pending/run/t5532.scala +++ b/tests/pending/run/t5532.scala @@ -1,4 +1,4 @@ object Test extends App { val x = s"1" val y = s"2" -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5543.scala b/tests/pending/run/t5543.scala index 3684bf969..1144184d7 100644 --- a/tests/pending/run/t5543.scala +++ b/tests/pending/run/t5543.scala @@ -17,7 +17,7 @@ object Test extends Function0[Int] { val v = 7 def apply() = 17 override def toString = "Test" - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val sut = new A()() println(sut.toString) println(sut.m()) @@ -40,6 +40,6 @@ object T { class D(val x: Any) { override def toString() = "D" // `this` refers again to T - def this(a: Int, b: Int, c: Any = {println(this); this}) { this(c); println(this) } // prints T, then prints D + def this(a: Int, b: Int, c: Any = {println(this); this}) = { this(c); println(this) } // prints T, then prints D } } diff --git a/tests/pending/run/t5552.scala b/tests/pending/run/t5552.scala index afb8a1f0b..dd32ce22c 100644 --- a/tests/pending/run/t5552.scala +++ b/tests/pending/run/t5552.scala @@ -3,7 +3,7 @@ class C[@specialized(Int) A](a:A) { def c = b } object Test { - def main(args:Array[String]) { + def main(args:Array[String]): Unit = { println(new C(3).c) println(new C(3.0).c) } diff --git a/tests/pending/run/t5565.scala b/tests/pending/run/t5565.scala index 9ced87ca2..91e238d07 100644 --- a/tests/pending/run/t5565.scala +++ b/tests/pending/run/t5565.scala @@ -2,7 +2,7 @@ import scala.language.reflectiveCalls import scala.language.implicitConversions object Test extends App { - implicit def doubleWithApproxEquals(d: Double) = new { + implicit def doubleWithApproxEquals(d: Double): AnyRef{def ~==(v: Double,margin: Double): Boolean; def ~==$default$2: Double @scala.annotation.unchecked.uncheckedVariance} = new { def ~==(v: Double, margin: Double = 0.001): Boolean = math.abs(d - v) < margin } diff --git a/tests/pending/run/t5577.scala b/tests/pending/run/t5577.scala index 650b3c2c6..d54a37e45 100644 --- a/tests/pending/run/t5577.scala +++ b/tests/pending/run/t5577.scala @@ -8,13 +8,13 @@ import collection._ object Test { class AlarmingBuffer[T] extends mutable.ArrayBuffer[T] { - override def sizeHint(x: Int) { + override def sizeHint(x: Int): Unit = { println("Received a size hint: " + x) super.sizeHint(x) } } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val iteratorBuilder = (new AlarmingBuffer[Int]) mapResult { res => res.iterator } diff --git a/tests/pending/run/t5588.scala b/tests/pending/run/t5588.scala index f214d1668..62bca8fd4 100644 --- a/tests/pending/run/t5588.scala +++ b/tests/pending/run/t5588.scala @@ -7,7 +7,7 @@ object Test { } import MyEnum._ - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println(Foo > Bar) println(X > Y) } diff --git a/tests/pending/run/t5590.scala b/tests/pending/run/t5590.scala index baf0503a0..aded59863 100644 --- a/tests/pending/run/t5590.scala +++ b/tests/pending/run/t5590.scala @@ -8,7 +8,7 @@ import collection._ object Test { - def check(obj: AnyRef) { + def check(obj: AnyRef): Unit = { println(obj) val bos = new ByteArrayOutputStream() @@ -21,7 +21,7 @@ object Test { println(deser) } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val lhm = mutable.LinkedHashMap("a" -> "a", "b" -> "b", "c" -> "c") val lhs = mutable.LinkedHashSet("a", "b", "c", "d", "e") check(lhm) diff --git a/tests/pending/run/t5604.scala b/tests/pending/run/t5604.scala index a06c8aab3..eccad1639 100644 --- a/tests/pending/run/t5604.scala +++ b/tests/pending/run/t5604.scala @@ -29,7 +29,7 @@ package foo { } package bar { object Main { - def main(args:Array[String]) { + def main(args:Array[String]): Unit = { duh(33L) duh(3.0d) foo.bar.duh(33L) diff --git a/tests/pending/run/t5608.scala b/tests/pending/run/t5608.scala index 19b368193..43e912122 100644 --- a/tests/pending/run/t5608.scala +++ b/tests/pending/run/t5608.scala @@ -1,5 +1,5 @@ object Test { - def main(args:Array[String]) { + def main(args:Array[String]): Unit = { val ns = Array(3L, 3L, 3L) val a1: A = new A(ns(0)) val a2: A = new A(ns(0)) diff --git a/tests/pending/run/t5610.scala b/tests/pending/run/t5610.scala index 82dabcc59..3659c69f0 100644 --- a/tests/pending/run/t5610.scala +++ b/tests/pending/run/t5610.scala @@ -23,7 +23,7 @@ object Test { def foo(s: => String)(dummy: Int) = () => println(s) - def m(a: Int*)(z: String, b: Int*) { + def m(a: Int*)(z: String, b: Int*): Unit = { println(a.toList) println(b.toList) } diff --git a/tests/pending/run/t5610a.scala b/tests/pending/run/t5610a.scala index f20b29576..0917dba2d 100644 --- a/tests/pending/run/t5610a.scala +++ b/tests/pending/run/t5610a.scala @@ -16,4 +16,4 @@ object Test extends App { } else { println("Stroke a kitten") } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5612.scala b/tests/pending/run/t5612.scala index 48b309354..08d006f88 100644 --- a/tests/pending/run/t5612.scala +++ b/tests/pending/run/t5612.scala @@ -3,7 +3,7 @@ object L extends Enumeration { } class Foo { - def foo(xs: List[L.Value]) { + def foo(xs: List[L.Value]): Unit = { import scala.util.control.Breaks.{break, breakable} println("START for " + xs) breakable { @@ -20,7 +20,7 @@ class Foo { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val f = new Foo() val l = List(L.Two, L.Two, L.One, L.Three) f.foo(l) diff --git a/tests/pending/run/t5629.scala b/tests/pending/run/t5629.scala index 5b91007f7..867e92f34 100644 --- a/tests/pending/run/t5629.scala +++ b/tests/pending/run/t5629.scala @@ -28,7 +28,7 @@ class AnyChild extends Parent[Any] { object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new IntChild().foo(33) new AnyChild().foo(33) } diff --git a/tests/pending/run/t5652/t5652_2.scala b/tests/pending/run/t5652/t5652_2.scala index 765d16f8f..db13b75ac 100644 --- a/tests/pending/run/t5652/t5652_2.scala +++ b/tests/pending/run/t5652/t5652_2.scala @@ -3,7 +3,7 @@ class A2 extends A1 with T1{ } object Test extends A2 { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println(Seq(Class.forName(classOf[T1].getName + "$class"), classOf[A1], classOf[A2]).flatMap(_.getDeclaredMethods.map(_.toString).sorted).mkString("\n")) } } diff --git a/tests/pending/run/t5652b/t5652b_2.scala b/tests/pending/run/t5652b/t5652b_2.scala index 113736a24..0fd6a9ab4 100644 --- a/tests/pending/run/t5652b/t5652b_2.scala +++ b/tests/pending/run/t5652b/t5652b_2.scala @@ -3,7 +3,7 @@ class A2 extends A1 { } object Test extends A2 { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println(Seq(classOf[A1], classOf[A2]).flatMap(_.getDeclaredMethods.map(_.toString).sorted).mkString("\n")) } } diff --git a/tests/pending/run/t5656.scala b/tests/pending/run/t5656.scala index 5eb1df51a..2c97d374d 100644 --- a/tests/pending/run/t5656.scala +++ b/tests/pending/run/t5656.scala @@ -4,7 +4,7 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println(Seq(List('1', '2', '3'), List('a', 'b', 'c')).view.addString(new StringBuilder, "_")) } diff --git a/tests/pending/run/t5676.scala b/tests/pending/run/t5676.scala index 0c920e4a9..817ac823a 100644 --- a/tests/pending/run/t5676.scala +++ b/tests/pending/run/t5676.scala @@ -14,7 +14,7 @@ class Baz[S] extends Foo[S] { object Test { - def main(a: Array[String]) { + def main(a: Array[String]): Unit = { val b = new Baz[Any] println(b.A.foo()) println(Modifier.isFinal(classOf[Baz[Any]].getModifiers())) diff --git a/tests/pending/run/t5680.scala b/tests/pending/run/t5680.scala index f61cbd6e2..52449849c 100644 --- a/tests/pending/run/t5680.scala +++ b/tests/pending/run/t5680.scala @@ -4,4 +4,4 @@ object Test extends App { println(x(0)) x(1) = () println(x(1)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5688.scala b/tests/pending/run/t5688.scala index f99bfb47d..266d364ae 100644 --- a/tests/pending/run/t5688.scala +++ b/tests/pending/run/t5688.scala @@ -20,4 +20,4 @@ object Test extends App { }) println(matched) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5704.scala b/tests/pending/run/t5704.scala index 495a82e4f..f2cb8f375 100644 --- a/tests/pending/run/t5704.scala +++ b/tests/pending/run/t5704.scala @@ -16,4 +16,4 @@ object Test extends App { } val qc = new MyQuerycollection qc.findUserByName("some value") -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5710-1.scala b/tests/pending/run/t5710-1.scala index 12bd858e0..29100ebb2 100644 --- a/tests/pending/run/t5710-1.scala +++ b/tests/pending/run/t5710-1.scala @@ -12,4 +12,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5710-2.scala b/tests/pending/run/t5710-2.scala index 6d2129cca..4eb53893f 100644 --- a/tests/pending/run/t5710-2.scala +++ b/tests/pending/run/t5710-2.scala @@ -12,4 +12,4 @@ object Test extends App { val toolbox = cm.mkToolBox() val evaluated = toolbox.eval(code.tree) println("evaluated = " + evaluated) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5733.scala b/tests/pending/run/t5733.scala index 360264e4e..df691cbb6 100644 --- a/tests/pending/run/t5733.scala +++ b/tests/pending/run/t5733.scala @@ -5,7 +5,7 @@ object A extends Dynamic { def selectDynamic(method:String): String = a - def updateDynamic(method:String)(v:String) { a = v } + def updateDynamic(method:String)(v:String): Unit = { a = v } } class B extends Dynamic { @@ -13,7 +13,7 @@ class B extends Dynamic { def selectDynamic(method:String): String = b - def updateDynamic(method:String)(v:String) { b = v } + def updateDynamic(method:String)(v:String): Unit = { b = v } } object Test extends App { @@ -38,7 +38,7 @@ object Test extends App { } class ABTest { - def test() { + def test(): Unit = { assert( A.foo == "a" ) assert( A.bar == "a" ) A.aaa = "aaa" diff --git a/tests/pending/run/t5804.scala b/tests/pending/run/t5804.scala index b6a8940c1..93cfa69ff 100644 --- a/tests/pending/run/t5804.scala +++ b/tests/pending/run/t5804.scala @@ -5,7 +5,7 @@ import collection.mutable._ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { class CustomHashMap extends HashMap[Int, Int] { override def initialSize = 65 diff --git a/tests/pending/run/t5816.scala b/tests/pending/run/t5816.scala index e8367ea81..5cc396ff5 100644 --- a/tests/pending/run/t5816.scala +++ b/tests/pending/run/t5816.scala @@ -5,7 +5,7 @@ import scala.tools.reflect.ToolBox object Test extends App { val toolbox = cm.mkToolBox() - def printSource[T](expr: Expr[T]) { + def printSource[T](expr: Expr[T]): Unit = { val ttree = toolbox typecheck expr.tree println(ttree.toString) } @@ -14,4 +14,4 @@ object Test extends App { printSource(reify { 5 + y }) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5830.scala b/tests/pending/run/t5830.scala index 03b9c540e..36da15e2b 100644 --- a/tests/pending/run/t5830.scala +++ b/tests/pending/run/t5830.scala @@ -52,4 +52,4 @@ object Test extends App { // test that it jumps to default case, no match error defaultUnguarded(' ', false) // default -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5840.scala b/tests/pending/run/t5840.scala index da036d512..bb1cd7fa4 100644 --- a/tests/pending/run/t5840.scala +++ b/tests/pending/run/t5840.scala @@ -4,4 +4,4 @@ object Test extends App { reify { class C[T <: String with Singleton] } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5856.scala b/tests/pending/run/t5856.scala index d1e9bd6e5..e300b8540 100644 --- a/tests/pending/run/t5856.scala +++ b/tests/pending/run/t5856.scala @@ -7,4 +7,4 @@ object Test extends App { assert(s"$this.##" == "Test.##") assert(s"$this.toString" == "Test.toString") assert(s"$this=THIS" == "Test=THIS") -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5857.scala b/tests/pending/run/t5857.scala index c82fd88c0..eabf5dc86 100644 --- a/tests/pending/run/t5857.scala +++ b/tests/pending/run/t5857.scala @@ -11,7 +11,7 @@ object Test { end - start } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val sz = 1000000000 val range = 1 to sz @@ -31,7 +31,7 @@ object Test { check { assert(numdesc.max == sz.toDouble) } } - def check[U](b: =>U) { + def check[U](b: =>U): Unit = { val exectime = time { b } diff --git a/tests/pending/run/t5867.scala b/tests/pending/run/t5867.scala index f7e9393b7..c7f5d0a41 100644 --- a/tests/pending/run/t5867.scala +++ b/tests/pending/run/t5867.scala @@ -4,7 +4,7 @@ import collection.mutable.UnrolledBuffer object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val buf = UnrolledBuffer(1 to 50: _*) val dub = buf ++ buf diff --git a/tests/pending/run/t5879.scala b/tests/pending/run/t5879.scala index 83a583da5..f96a17410 100644 --- a/tests/pending/run/t5879.scala +++ b/tests/pending/run/t5879.scala @@ -3,14 +3,14 @@ import collection.immutable.HashMap object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { resolveDefault() resolveFirst() resolveSecond() resolveMany() } - def resolveDefault() { + def resolveDefault(): Unit = { val a = HashMap(1 -> "1") val b = HashMap(1 -> "2") @@ -19,7 +19,7 @@ object Test { println(r(1)) } - def resolveFirst() { + def resolveFirst(): Unit = { val a = HashMap(1 -> "1") val b = HashMap(1 -> "2") def collision(a: (Int, String), b: (Int, String)) = { @@ -32,7 +32,7 @@ object Test { println(r(1)) } - def resolveSecond() { + def resolveSecond(): Unit = { val a = HashMap(1 -> "1") val b = HashMap(1 -> "2") def collision(a: (Int, String), b: (Int, String)) = { @@ -45,7 +45,7 @@ object Test { println(r(1)) } - def resolveMany() { + def resolveMany(): Unit = { val a = HashMap((0 until 100) zip (0 until 100): _*) val b = HashMap((0 until 100) zip (100 until 200): _*) def collision(a: (Int, Int), b: (Int, Int)) = { diff --git a/tests/pending/run/t5880.scala b/tests/pending/run/t5880.scala index f88df9016..5608f4fed 100644 --- a/tests/pending/run/t5880.scala +++ b/tests/pending/run/t5880.scala @@ -15,7 +15,7 @@ object Test { // chi square test val groups = 10 val hits = new Array[Int](groups) - def hit(hc: Int) { + def hit(hc: Int): Unit = { val bucket = math.abs(hc) / (Int.MaxValue / groups) hits(bucket) += 1 } diff --git a/tests/pending/run/t5881.scala b/tests/pending/run/t5881.scala index 04b24b713..14d794da9 100644 --- a/tests/pending/run/t5881.scala +++ b/tests/pending/run/t5881.scala @@ -2,6 +2,6 @@ import scala.language.existentials import scala.reflect.ClassTag object Test extends App { - println(implicitly[ClassTag[List[T forSome {type T <: List[T]}]]]) + println(implicitly[ClassTag[List[T forSome { type T <: List[T] }]]]) println(implicitly[ClassTag[List[Any]]]) } diff --git a/tests/pending/run/t5894.scala b/tests/pending/run/t5894.scala index 6e118fd39..c67a46def 100644 --- a/tests/pending/run/t5894.scala +++ b/tests/pending/run/t5894.scala @@ -7,7 +7,7 @@ object Test { def foo: Unit = macro fooImpl def fooImpl(c: Context) = { import c.universe._; c.Expr[Unit](q"()") } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { try { val method = classOf[Test].getMethod("foo") sys.error("Static forwarder generated for macro: " + method) diff --git a/tests/pending/run/t5907.scala b/tests/pending/run/t5907.scala index a005e9fbd..14366a6ed 100644 --- a/tests/pending/run/t5907.scala +++ b/tests/pending/run/t5907.scala @@ -1,12 +1,12 @@ object Test extends App { t - def t { + def t: Unit = { val c1 = C1()(1) println(c1.copy()(2)) { - implicit val i = 2873 + implicit val i: Int = 2873 println(c1.copy()) } @@ -27,8 +27,8 @@ object Test extends App { println(c5.copy(y = 19)(33,"b")) { - implicit val i = 193 - implicit val s = "c" + implicit val i: Int = 193 + implicit val s: String = "c" println(c5.copy()) println(c5.copy(y = 371)) println(c5.copy(x = -1)(-2, "lken")) @@ -38,7 +38,7 @@ object Test extends App { println(c6.copy(29)(18)(-12)) { - implicit val i = 2892 + implicit val i: Int = 2892 println(c6.copy(x = 1)(93)) println(c6.copy(x = 1)(93)(761)) } @@ -47,7 +47,7 @@ object Test extends App { println(c7.copy()(22)(33)("elkj")) { - implicit val s = "me" + implicit val s: String = "me" println(c7.copy()(283)(29872)) println(c7.copy(37)(298)(899)("ekjr")) } @@ -56,7 +56,7 @@ object Test extends App { println(c8.copy(x = 172)(989, 77)()("eliurna")) { - implicit val s = "schtring" + implicit val s: String = "schtring" println(c8.copy()(82,2111)()) println(c8.copy(x = -1)(92,29)()("lken")) } @@ -65,7 +65,7 @@ object Test extends App { println(c9.copy()(271)()()("ehebab")) { - implicit val s = "enag" + implicit val s: String = "enag" println(c9.copy()(299)) println(c9.copy()(299)()) println(c9.copy()(299)()()) @@ -80,7 +80,7 @@ object Test extends App { println(c10.copy(new KA)(new KB)(new KB)) { - implicit val k = new KA + implicit val k: KA = new KA println(c10.copy(new KA)(new KB)) } } diff --git a/tests/pending/run/t5914.scala b/tests/pending/run/t5914.scala index 45d881573..39a8dd3ca 100644 --- a/tests/pending/run/t5914.scala +++ b/tests/pending/run/t5914.scala @@ -20,4 +20,4 @@ object Test extends App with Trees { case class TypeTree(meh: String) extends Tree object TypeTree extends TypeTreeExtractor test(null) // should not crash -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5923b/Test.scala b/tests/pending/run/t5923b/Test.scala index 7c2627462..3facd2b28 100644 --- a/tests/pending/run/t5923b/Test.scala +++ b/tests/pending/run/t5923b/Test.scala @@ -4,4 +4,4 @@ object Test extends App { println(cbf().result.getClass) println(new Array[Nothing](0).getClass) println(Array[Nothing]().getClass) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5923c.scala b/tests/pending/run/t5923c.scala index 956b25678..f15602ae0 100644 --- a/tests/pending/run/t5923c.scala +++ b/tests/pending/run/t5923c.scala @@ -1,4 +1,4 @@ // see neg/macro-blackbox-fundep-materialization and run/macro-whitebox-fundep-materialization object Test extends App { // do nothing -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5943a1.scala b/tests/pending/run/t5943a1.scala index 6bb828de8..ee62ea76b 100644 --- a/tests/pending/run/t5943a1.scala +++ b/tests/pending/run/t5943a1.scala @@ -6,4 +6,4 @@ object Test extends App { val tb = cm.mkToolBox() val expr = tb.parse("1 to 3 map (_+1)") println(tb.typecheck(expr)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5943a2.scala b/tests/pending/run/t5943a2.scala index fda800852..5007a4d5e 100644 --- a/tests/pending/run/t5943a2.scala +++ b/tests/pending/run/t5943a2.scala @@ -6,4 +6,4 @@ object Test extends App { val tb = cm.mkToolBox() val expr = tb.parse("1 to 3 map (_+1)") println(tb.eval(expr)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t5966.scala b/tests/pending/run/t5966.scala index bbe1a6e87..fe2da8474 100644 --- a/tests/pending/run/t5966.scala +++ b/tests/pending/run/t5966.scala @@ -1,7 +1,7 @@ object o { def apply(i: AnyRef*)(j: String) = i } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println("(o()_)(\"\") = " + (o()_)("")) println("(o(\"a1\")_)(\"\") = " + (o("a1")_)("")) println("(o(\"a1\", \"a2\")_)(\"\") = " + (o("a1", "a2")_)("")) diff --git a/tests/pending/run/t5971.scala b/tests/pending/run/t5971.scala index bc24255ec..bd41350aa 100644 --- a/tests/pending/run/t5971.scala +++ b/tests/pending/run/t5971.scala @@ -13,7 +13,7 @@ */ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println("bar".view.reverse.filter(_ > 'a').mkString(",")) println("bar".view.reverse.take(1).mkString(",")) println("bar".view.reverse.dropWhile(_ > 'a').mkString(",")) diff --git a/tests/pending/run/t5986.scala b/tests/pending/run/t5986.scala index b9c21a7b3..b05d488f2 100644 --- a/tests/pending/run/t5986.scala +++ b/tests/pending/run/t5986.scala @@ -18,14 +18,14 @@ object Test { implicit val ordering: Ordering[Foo] = Ordering.fromLessThan[Foo] { (a, b) => a.name.compareTo(b.name) < 0 } - def check[S <: Set[Foo]](set: S) { + def check[S <: Set[Foo]](set: S): Unit = { def output(s: Set[Foo]) = println(s.toList.sorted.mkString(",")) output(set + new Foo("bar", 2)) output(set ++ List(new Foo("bar", 2), new Foo("bar", 3), new Foo("bar", 4))) output(set union Set(new Foo("bar", 2), new Foo("baz", 3), new Foo("bazz", 4))) } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { check(Set(new Foo("bar", 1))) check(immutable.Set(new Foo("bar", 1))) check(mutable.Set(new Foo("bar", 1))) diff --git a/tests/pending/run/t6011b.scala b/tests/pending/run/t6011b.scala index 3d405e070..9d15bd664 100644 --- a/tests/pending/run/t6011b.scala +++ b/tests/pending/run/t6011b.scala @@ -8,4 +8,4 @@ object Test extends App { } println(f('a') + f('z')) // 3 -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6052.scala b/tests/pending/run/t6052.scala index 5482cfb29..fc70d3962 100644 --- a/tests/pending/run/t6052.scala +++ b/tests/pending/run/t6052.scala @@ -9,7 +9,7 @@ object Test extends App { def seqarr(i: Int) = Array[Int]() ++ (0 until i) def pararr(i: Int) = seqarr(i).par - def check[T](i: Int, f: Int => T) { + def check[T](i: Int, f: Int => T): Unit = { val gseq = seqarr(i).toSeq.groupBy(f) val gpar = pararr(i).groupBy(f) assert(gseq == gpar, (gseq, gpar)) diff --git a/tests/pending/run/t6064.scala b/tests/pending/run/t6064.scala index fc184dd92..183599970 100644 --- a/tests/pending/run/t6064.scala +++ b/tests/pending/run/t6064.scala @@ -6,4 +6,4 @@ object Test extends App { assert(!(None contains 42)) assert(Some(null) contains null) assert(!(Option(null) contains null)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6070.scala b/tests/pending/run/t6070.scala index 434949f86..7acd2573d 100644 --- a/tests/pending/run/t6070.scala +++ b/tests/pending/run/t6070.scala @@ -27,10 +27,10 @@ object Test extends App { println(b.size({ mutate(); b.x })) } - def mutate() { + def mutate(): Unit = { m.bomb = new IntBomb } val m = Mean(new StringBomb) foo(m) // should print 3 -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6077_patmat_cse_irrefutable.scala b/tests/pending/run/t6077_patmat_cse_irrefutable.scala index b130ae781..18db6c13e 100644 --- a/tests/pending/run/t6077_patmat_cse_irrefutable.scala +++ b/tests/pending/run/t6077_patmat_cse_irrefutable.scala @@ -10,4 +10,4 @@ object Test extends App { case LiteralNode(true) => println("uh-oh") case LiteralNode(false) => println("ok") } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6086-vanilla.scala b/tests/pending/run/t6086-vanilla.scala index b4de581ad..84faa57f6 100644 --- a/tests/pending/run/t6086-vanilla.scala +++ b/tests/pending/run/t6086-vanilla.scala @@ -3,4 +3,4 @@ case class X(s: String) object Test extends App { import scala.reflect.runtime.universe._ println(typeOf[X]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6089.scala b/tests/pending/run/t6089.scala index c72d7ba79..8fb4082b7 100644 --- a/tests/pending/run/t6089.scala +++ b/tests/pending/run/t6089.scala @@ -10,4 +10,4 @@ object Test { } catch { case x: MatchError => println(x) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6102.scala b/tests/pending/run/t6102.scala index 53584055b..225791bb1 100644 --- a/tests/pending/run/t6102.scala +++ b/tests/pending/run/t6102.scala @@ -2,7 +2,7 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { try { val x = 3 } finally { diff --git a/tests/pending/run/t6104.scala b/tests/pending/run/t6104.scala index 8ab12c775..ac6d4c77e 100644 --- a/tests/pending/run/t6104.scala +++ b/tests/pending/run/t6104.scala @@ -5,4 +5,4 @@ class A { Self => } } -object Test extends A with App
\ No newline at end of file +object Test extends A with App diff --git a/tests/pending/run/t6111.scala b/tests/pending/run/t6111.scala index c0bcf17a0..a32f6a0d0 100644 --- a/tests/pending/run/t6111.scala +++ b/tests/pending/run/t6111.scala @@ -25,4 +25,4 @@ object Test extends App { // Prints '(x, x)' "x" match { case Foo997(a) => println(a) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6126.scala b/tests/pending/run/t6126.scala index d552d8e69..c328bf08f 100644 --- a/tests/pending/run/t6126.scala +++ b/tests/pending/run/t6126.scala @@ -2,7 +2,7 @@ trait LogLevelType object Test { type LogLevel = Int with LogLevelType final val ErrorLevel = 1.asInstanceOf[Int with LogLevelType] - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { List(ErrorLevel, ErrorLevel) } } diff --git a/tests/pending/run/t6135.scala b/tests/pending/run/t6135.scala index c0f8f3fd1..fdbe6048f 100644 --- a/tests/pending/run/t6135.scala +++ b/tests/pending/run/t6135.scala @@ -2,7 +2,7 @@ object Test extends App { class A { class V } abstract class B[S] { - def foo(t: S, a: A)(v: a.V) + def foo(t: S, a: A)(v: a.V): Unit } val b1 = new B[String] { diff --git a/tests/pending/run/t6154.scala b/tests/pending/run/t6154.scala index 02ef62905..47773490a 100644 --- a/tests/pending/run/t6154.scala +++ b/tests/pending/run/t6154.scala @@ -1,5 +1,5 @@ object Test { - def foo(a: Int) { + def foo(a: Int): Unit = { var bar: Int = 0 bar = try { 0 } catch { case ex: Throwable => 0 } new { foo(bar) } diff --git a/tests/pending/run/t6175.scala b/tests/pending/run/t6175.scala index 69a0a712b..5ee1ab05e 100644 --- a/tests/pending/run/t6175.scala +++ b/tests/pending/run/t6175.scala @@ -2,4 +2,4 @@ object Test extends App { import reflect.runtime._ val m = universe.typeOf[List[_]].members.head.asMethod currentMirror.reflect (List (2, 3, 1)).reflectMethod(m) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6178.scala b/tests/pending/run/t6178.scala index 41e148af9..2caea1eb2 100644 --- a/tests/pending/run/t6178.scala +++ b/tests/pending/run/t6178.scala @@ -4,4 +4,4 @@ import scala.reflect.runtime.{currentMirror => cm} object Test extends App { val plus = typeOf[java.lang.String].member(TermName("$plus")).asMethod println(cm.reflect("").reflectMethod(plus).apply("2")) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6181.scala b/tests/pending/run/t6181.scala index eaa734017..4ec9a4a0a 100644 --- a/tests/pending/run/t6181.scala +++ b/tests/pending/run/t6181.scala @@ -5,4 +5,4 @@ object Test extends App { class C { def test(x: => Int) = println(x) } val mm = cm.reflect(new C).reflectMethod(typeOf[C].member(TermName("test")).asMethod) mm(2) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6188.scala b/tests/pending/run/t6188.scala index 48180ddf9..b6261580e 100644 --- a/tests/pending/run/t6188.scala +++ b/tests/pending/run/t6188.scala @@ -3,7 +3,7 @@ import scala.util.Success object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val e = new Exception("this is an exception") val res = Success(1).flatMap[Int](x => throw e) println(res) diff --git a/tests/pending/run/t6196.scala b/tests/pending/run/t6196.scala index a75911fb9..19ac41193 100644 --- a/tests/pending/run/t6196.scala +++ b/tests/pending/run/t6196.scala @@ -8,7 +8,7 @@ object Test extends App { override def hashCode = value / 5 } - def testCorrectness[T : Ordering](n: Int, mkKey: Int => T) { + def testCorrectness[T : Ordering](n: Int, mkKey: Int => T): Unit = { val o = implicitly[Ordering[T]] val s = HashSet.empty[T] ++ (0 until n).map(mkKey) for (i <- 0 until n) { @@ -23,14 +23,14 @@ object Test extends App { // this tests the structural sharing of the new filter // I could not come up with a simple test that tests structural sharing when only parts are reused, but // at least this fails with the old and passes with the new implementation - def testSharing() { + def testSharing(): Unit = { val s = HashSet.empty[Int] ++ (0 until 100) require(s.filter(_ => true) eq s) require(s.filterNot(_ => false) eq s) } // this tests that neither hashCode nor equals are called during filter - def testNoHashing() { + def testNoHashing(): Unit = { var hashCount = 0 var equalsCount = 0 case class HashCounter(value:Int) extends Ordered[HashCounter] { diff --git a/tests/pending/run/t6199-mirror.scala b/tests/pending/run/t6199-mirror.scala index 3fda56bf7..b85ca9162 100644 --- a/tests/pending/run/t6199-mirror.scala +++ b/tests/pending/run/t6199-mirror.scala @@ -4,4 +4,4 @@ import scala.reflect.runtime.{currentMirror => cm} object Test extends App { class C { def foo = () } println(cm.reflect(new C).reflectMethod(typeOf[C].member(TermName("foo")).asMethod)()) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6199-toolbox.scala b/tests/pending/run/t6199-toolbox.scala index 6ba5e50f6..d11f566ea 100644 --- a/tests/pending/run/t6199-toolbox.scala +++ b/tests/pending/run/t6199-toolbox.scala @@ -5,4 +5,4 @@ import scala.tools.reflect.ToolBox object Test extends App { val tb = cm.mkToolBox() println(tb.eval(q"()")) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6200.scala b/tests/pending/run/t6200.scala index 75600cd55..fd96b3ab5 100644 --- a/tests/pending/run/t6200.scala +++ b/tests/pending/run/t6200.scala @@ -8,7 +8,7 @@ object Test extends App { override def hashCode = value / 5 } - def testCorrectness[T: Ordering](n: Int, mkKey: Int => T) { + def testCorrectness[T: Ordering](n: Int, mkKey: Int => T): Unit = { val o = implicitly[Ordering[T]] val s = HashMap.empty[T, Unit] ++ (0 until n).map(x => mkKey(x) -> (())) for (i <- 0 until n) { @@ -23,14 +23,14 @@ object Test extends App { // this tests the structural sharing of the new filter // I could not come up with a simple test that tests structural sharing when only parts are reused, but // at least this fails with the old and passes with the new implementation - def testSharing() { + def testSharing(): Unit = { val s = HashMap.empty[Int, Unit] ++ (0 until 100).map(_ -> (())) require(s.filter(_ => true) eq s) require(s.filterNot(_ => false) eq s) } // this tests that neither hashCode nor equals are called during filter - def testNoHashing() { + def testNoHashing(): Unit = { var hashCount = 0 var equalsCount = 0 case class HashCounter(value: Int) extends Ordered[HashCounter] { diff --git a/tests/pending/run/t6206.scala b/tests/pending/run/t6206.scala index 07ff246d0..668ade7f5 100644 --- a/tests/pending/run/t6206.scala +++ b/tests/pending/run/t6206.scala @@ -1,5 +1,5 @@ class Outer { - def apply( position : Inner ) {} + def apply( position : Inner ): Unit = {} class Inner this.apply(new Inner) diff --git a/tests/pending/run/t6220.scala b/tests/pending/run/t6220.scala index 834b692f4..85995e1ef 100644 --- a/tests/pending/run/t6220.scala +++ b/tests/pending/run/t6220.scala @@ -4,7 +4,7 @@ object Test extends App { // finds an int x such that improved(x) differs in the first bit to improved(0), // which is the worst case for the HashTrieSet - def findWorstCaseInts() { + def findWorstCaseInts(): Unit = { // copy of improve from HashSet def improve(hcode: Int) = { var h: Int = hcode + ~(hcode << 9) @@ -63,7 +63,7 @@ object Test extends App { package scala.collection.immutable { object StructureTests { - def printStructure(x:HashSet[_], prefix:String="") { + def printStructure(x:HashSet[_], prefix:String=""): Unit = { x match { case m:HashSet.HashTrieSet[_] => println(prefix+m.getClass.getSimpleName + " " + m.size) @@ -77,7 +77,7 @@ package scala.collection.immutable { } } - def validate(x:HashSet[_]) { + def validate(x:HashSet[_]): Unit = { x match { case m:HashSet.HashTrieSet[_] => require(m.elems.size>1 || (m.elems.size==1 && m.elems(0).isInstanceOf[HashSet.HashTrieSet[_]])) diff --git a/tests/pending/run/t6223.scala b/tests/pending/run/t6223.scala index 0996ea1c4..68a91a82f 100644 --- a/tests/pending/run/t6223.scala +++ b/tests/pending/run/t6223.scala @@ -3,7 +3,7 @@ class Foo[@specialized(Int) A](a:A) { } object Test { - def main(args:Array[String]) { + def main(args:Array[String]): Unit = { val f = new Foo(333) val ms = f.getClass().getDeclaredMethods().map(_.getName).sorted ms.foreach(println) diff --git a/tests/pending/run/t6240a/StepTwo.scala b/tests/pending/run/t6240a/StepTwo.scala index fc3221921..f20d7b83c 100644 --- a/tests/pending/run/t6240a/StepTwo.scala +++ b/tests/pending/run/t6240a/StepTwo.scala @@ -4,4 +4,4 @@ import java.net.URLClassLoader object StepTwo extends App { import scala.reflect.runtime.universe._ println(typeOf[StepTwo.type]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6240a/Test.scala b/tests/pending/run/t6240a/Test.scala index 05c3678cb..844c0763e 100644 --- a/tests/pending/run/t6240a/Test.scala +++ b/tests/pending/run/t6240a/Test.scala @@ -12,4 +12,4 @@ object Test extends App { val fullTestClassesClasspath = testClassesDir + prop("path.separator") + prop("java.class.path") val javaBinary = if (new File(prop("javacmd")).isAbsolute) prop("javacmd") else prop("java.home") + "/bin/" + prop("javacmd") List(javaBinary, "-cp", testClassesDir, "-Dlaunch.classpath=" + fullTestClassesClasspath, "StepOne").! -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6240b/StepThree.scala b/tests/pending/run/t6240b/StepThree.scala index 210795d68..6690b8351 100644 --- a/tests/pending/run/t6240b/StepThree.scala +++ b/tests/pending/run/t6240b/StepThree.scala @@ -1,4 +1,4 @@ object StepThree extends App { import scala.reflect.runtime.universe._ println(typeOf[StepThree.type]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6240b/StepTwo.scala b/tests/pending/run/t6240b/StepTwo.scala index 88e46492e..d607c01cd 100644 --- a/tests/pending/run/t6240b/StepTwo.scala +++ b/tests/pending/run/t6240b/StepTwo.scala @@ -7,4 +7,4 @@ object StepTwo extends App { val stepThree = cl.loadClass("StepThree") val main = stepThree.getDeclaredMethod("main", classOf[Array[String]]) main.invoke(null, Array[String]()) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6240b/Test.scala b/tests/pending/run/t6240b/Test.scala index 05c3678cb..844c0763e 100644 --- a/tests/pending/run/t6240b/Test.scala +++ b/tests/pending/run/t6240b/Test.scala @@ -12,4 +12,4 @@ object Test extends App { val fullTestClassesClasspath = testClassesDir + prop("path.separator") + prop("java.class.path") val javaBinary = if (new File(prop("javacmd")).isAbsolute) prop("javacmd") else prop("java.home") + "/bin/" + prop("javacmd") List(javaBinary, "-cp", testClassesDir, "-Dlaunch.classpath=" + fullTestClassesClasspath, "StepOne").! -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6246.scala b/tests/pending/run/t6246.scala index 2db87aa6d..ef49a517c 100644 --- a/tests/pending/run/t6246.scala +++ b/tests/pending/run/t6246.scala @@ -2,7 +2,7 @@ import scala.reflect.{ClassTag, classTag} @deprecated("Suppress warnings", since="2.11") object Test extends App { - def testValueClass(tag: ClassTag[_]) { + def testValueClass(tag: ClassTag[_]): Unit = { println(s"runtimeClass = ${tag.runtimeClass}, toString = ${tag.toString}") println(tag <:< tag) println(tag <:< ClassTag.AnyVal) diff --git a/tests/pending/run/t6253a.scala b/tests/pending/run/t6253a.scala index efa3230df..f3573347c 100644 --- a/tests/pending/run/t6253a.scala +++ b/tests/pending/run/t6253a.scala @@ -28,7 +28,7 @@ object Test extends App { } } - def testUnion[T](sizes: Seq[Int], offsets: Seq[Double], keyType: String, mkKey: Int => T) { + def testUnion[T](sizes: Seq[Int], offsets: Seq[Double], keyType: String, mkKey: Int => T): Unit = { for { i <- sizes o <- offsets diff --git a/tests/pending/run/t6253b.scala b/tests/pending/run/t6253b.scala index 9cbfefd49..b0ce8a736 100644 --- a/tests/pending/run/t6253b.scala +++ b/tests/pending/run/t6253b.scala @@ -26,7 +26,7 @@ object Test extends App { } } - def testIntersect[T](sizes: Seq[Int], offsets: Seq[Double], keyType: String, mkKey: Int => T) { + def testIntersect[T](sizes: Seq[Int], offsets: Seq[Double], keyType: String, mkKey: Int => T): Unit = { for { i <- sizes o <- offsets diff --git a/tests/pending/run/t6253c.scala b/tests/pending/run/t6253c.scala index 71dfe1473..dcaa8ae3e 100644 --- a/tests/pending/run/t6253c.scala +++ b/tests/pending/run/t6253c.scala @@ -26,7 +26,7 @@ object Test extends App { } } - def testDiff[T](sizes: Seq[Int], offsets: Seq[Double], keyType: String, mkKey: Int => T) { + def testDiff[T](sizes: Seq[Int], offsets: Seq[Double], keyType: String, mkKey: Int => T): Unit = { for { i <- sizes o <- offsets diff --git a/tests/pending/run/t6259.scala b/tests/pending/run/t6259.scala index b2c27df51..2280231f4 100644 --- a/tests/pending/run/t6259.scala +++ b/tests/pending/run/t6259.scala @@ -28,10 +28,12 @@ trait NeedsEarly { val x: AnyRef } -object Early extends { - // Drops to this.getClass and is not ok... - val x = { object EarlyOk extends A[String]; EarlyOk } -} with NeedsEarly +object Early extends NeedsEarly { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val x = { object EarlyOk extends A[String]; EarlyOk } +// END copied early initializers +} class DoubleTrouble[X](x: AnyRef)(implicit override val tt: TypeTag[X]) extends A[X] diff --git a/tests/pending/run/t6260-delambdafy.scala b/tests/pending/run/t6260-delambdafy.scala index 056b1edd4..a4a3cfc8f 100644 --- a/tests/pending/run/t6260-delambdafy.scala +++ b/tests/pending/run/t6260-delambdafy.scala @@ -2,7 +2,7 @@ class C[A](private val a: Any) extends AnyVal object Test { val f = (x: C[Any]) => {println(s"f($x)"); x} - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { f(new C(".")) val methods = f.getClass.getDeclaredMethods.map(_.getName).sorted println("") diff --git a/tests/pending/run/t6260.scala b/tests/pending/run/t6260.scala index cfe9e1e64..3ad4926c8 100644 --- a/tests/pending/run/t6260.scala +++ b/tests/pending/run/t6260.scala @@ -5,7 +5,7 @@ class Box[X <: CharSequence](val x: X) extends AnyVal { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val g = (x: String) => x + x println(new Box("abc") map g) } diff --git a/tests/pending/run/t6260c.scala b/tests/pending/run/t6260c.scala index 845dc157b..30d0cd87b 100644 --- a/tests/pending/run/t6260c.scala +++ b/tests/pending/run/t6260c.scala @@ -6,7 +6,7 @@ object Test { def apply(a: A): A } val g = new T[C[Any]] { def apply(a: C[Any]) = { println(s"g($a)"); a } } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { f(new C(".")) val methods = f.getClass.getDeclaredMethods.map(_.getName).sorted println("") diff --git a/tests/pending/run/t6261.scala b/tests/pending/run/t6261.scala index bf6d640de..92193b879 100644 --- a/tests/pending/run/t6261.scala +++ b/tests/pending/run/t6261.scala @@ -2,7 +2,7 @@ import scala.collection.immutable._ object Test extends App { - def test1() { + def test1(): Unit = { // test that a HashTrieMap with one leaf element is not created! val x = HashMap.empty + (1->1) + (2->2) if(x.getClass.getSimpleName != "HashTrieMap") @@ -13,7 +13,7 @@ object Test extends App { println("A hash map containing one element should always use HashMap1") } - def test2() { + def test2(): Unit = { // class that always causes hash collisions case class Collision(value:Int) { override def hashCode = 0 } @@ -27,10 +27,10 @@ object Test extends App { if(y.getClass.getSimpleName != "HashMap1") println("HashMap of size 1 should use HashMap1" + y.getClass) } - def test3() { + def test3(): Unit = { // finds an int x such that improved(x) differs in the first bit to improved(0), // which is the worst case for the HashTrieSet - def findWorstCaseInts() { + def findWorstCaseInts(): Unit = { // copy of improve from HashSet def improve(hcode: Int) = { var h: Int = hcode + ~(hcode << 9) @@ -94,7 +94,7 @@ object Test extends App { package scala.collection.immutable { object StructureTests { - def printStructure(x:HashMap[_,_], prefix:String="") { + def printStructure(x:HashMap[_,_], prefix:String=""): Unit = { x match { case m:HashMap.HashTrieMap[_,_] => println(prefix+m.getClass.getSimpleName + " " + m.size) @@ -108,7 +108,7 @@ package scala.collection.immutable { } } - def validate(x:HashMap[_,_]) { + def validate(x:HashMap[_,_]): Unit = { x match { case m:HashMap.HashTrieMap[_,_] => require(m.elems.size>1 || (m.elems.size==1 && m.elems(0).isInstanceOf[HashMap.HashTrieMap[_,_]])) diff --git a/tests/pending/run/t627.scala b/tests/pending/run/t627.scala index ecaf15074..7136169b0 100644 --- a/tests/pending/run/t627.scala +++ b/tests/pending/run/t627.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val s: Seq[Int] = Array(1, 2, 3, 4) println(s) } diff --git a/tests/pending/run/t6272.scala b/tests/pending/run/t6272.scala index 174436919..a43e42c47 100644 --- a/tests/pending/run/t6272.scala +++ b/tests/pending/run/t6272.scala @@ -27,7 +27,7 @@ object A { } - def method { + def method: Unit = { try { lazy val x6 = 6 println(x6) @@ -56,7 +56,7 @@ object A { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { A.method } } diff --git a/tests/pending/run/t6277.scala b/tests/pending/run/t6277.scala index 41feee8a8..48db23da2 100644 --- a/tests/pending/run/t6277.scala +++ b/tests/pending/run/t6277.scala @@ -6,4 +6,4 @@ object Test extends App { val q = sym.isSealed println(q) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6287.scala b/tests/pending/run/t6287.scala index 0c75d1081..d0a0f7005 100644 --- a/tests/pending/run/t6287.scala +++ b/tests/pending/run/t6287.scala @@ -8,4 +8,4 @@ object Test extends App { println(tb.eval(t1)) println(tb.eval(t1)) println(tb.eval(t1)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6290.scala b/tests/pending/run/t6290.scala index 9d05db0d1..6552a747c 100644 --- a/tests/pending/run/t6290.scala +++ b/tests/pending/run/t6290.scala @@ -1,4 +1,4 @@ object Test { - implicit val foo = language.dynamics + implicit val foo: languageFeature.dynamics = language.dynamics def main(args: Array[String]): Unit = () } diff --git a/tests/pending/run/t6308.scala b/tests/pending/run/t6308.scala index d23cd6e13..62983abe5 100644 --- a/tests/pending/run/t6308.scala +++ b/tests/pending/run/t6308.scala @@ -21,7 +21,7 @@ object Test { def todo2[@sp(Int) A, B <: AnyRef](a: A, b: String) = { val c = caller; print(""); c } def todo3[B <: List[A], @specialized(Int) A](a: A, b: B) = { val c = caller; print(""); c } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val s = "" val result = s"""|- Unspecialized type args diff --git a/tests/pending/run/t6309.scala b/tests/pending/run/t6309.scala index 7bbca63c2..f0bcca69c 100644 --- a/tests/pending/run/t6309.scala +++ b/tests/pending/run/t6309.scala @@ -3,14 +3,16 @@ trait A { } object Test { - def f(a: Int) = new { - //private val b = a - private[this] val b = a // crashes, sorry scalac - } with A { + def f(a: Int) = new A { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +private[this] val b = a +// END copied early initializers + def a = b } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println(f(7).a) } } diff --git a/tests/pending/run/t6318_derived.scala b/tests/pending/run/t6318_derived.scala index ccdc18dae..e70473062 100644 --- a/tests/pending/run/t6318_derived.scala +++ b/tests/pending/run/t6318_derived.scala @@ -1,7 +1,7 @@ import scala.reflect.{ClassTag, classTag} object Test extends App { - def test[T: ClassTag](x: T) { + def test[T: ClassTag](x: T): Unit = { println(classTag[T].runtimeClass.isAssignableFrom(x.getClass)) println(classTag[T].unapply(x)) } @@ -12,4 +12,4 @@ object Test extends App { //println(classTag[X].runtimeClass.isAssignableFrom(x.getClass)) println(classTag[X].unapply(x)) test(x) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6318_primitives.scala b/tests/pending/run/t6318_primitives.scala index bc8ec8835..36e25de62 100644 --- a/tests/pending/run/t6318_primitives.scala +++ b/tests/pending/run/t6318_primitives.scala @@ -1,7 +1,7 @@ import scala.reflect.{ClassTag, classTag} object Test extends App { - def test[T: ClassTag](x: T) { + def test[T: ClassTag](x: T): Unit = { println(s"Checking if ${x.getClass} matches ${classTag[T].runtimeClass}") println(classTag[T].unapply(x)) } diff --git a/tests/pending/run/t6323b.scala b/tests/pending/run/t6323b.scala index 50d0900c7..88c2ae54d 100644 --- a/tests/pending/run/t6323b.scala +++ b/tests/pending/run/t6323b.scala @@ -18,4 +18,4 @@ object Test extends App { case ScalaReflectionException(msg) => println(msg) } } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6329_vanilla_bug.scala b/tests/pending/run/t6329_vanilla_bug.scala index 404f90bf6..a0e6092cd 100644 --- a/tests/pending/run/t6329_vanilla_bug.scala +++ b/tests/pending/run/t6329_vanilla_bug.scala @@ -4,4 +4,4 @@ import scala.reflect.runtime._ object Test extends App { println(classManifest[List[_]]) println(scala.reflect.classTag[List[_]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6337a.scala b/tests/pending/run/t6337a.scala index f5490f5cf..0a78cd0b8 100644 --- a/tests/pending/run/t6337a.scala +++ b/tests/pending/run/t6337a.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val x = X(XX(3)) assert(x.q.x.x + 9 == 13) } diff --git a/tests/pending/run/t6380.scala b/tests/pending/run/t6380.scala index 0e264d917..d7344c752 100644 --- a/tests/pending/run/t6380.scala +++ b/tests/pending/run/t6380.scala @@ -17,4 +17,4 @@ class Foo { def bar6 = ??? @throws[NullPointerException]("Cause A") @throws[NullPointerException]("Cause B") def bar7 = ??? -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6385.scala b/tests/pending/run/t6385.scala index 24fc3cd76..f86fe8c14 100644 --- a/tests/pending/run/t6385.scala +++ b/tests/pending/run/t6385.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val y: AA[Int] = C(2) val c: Int = y.x.y assert(c == 2) diff --git a/tests/pending/run/t6392a.scala b/tests/pending/run/t6392a.scala index 3a4f9fd0a..0da8552fb 100644 --- a/tests/pending/run/t6392a.scala +++ b/tests/pending/run/t6392a.scala @@ -6,4 +6,4 @@ object Test extends App { val tb = cm.mkToolBox() val c = tb.parse("object C") println(tb.eval(c)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6392b.scala b/tests/pending/run/t6392b.scala index e43c1a2b0..29c9a0112 100644 --- a/tests/pending/run/t6392b.scala +++ b/tests/pending/run/t6392b.scala @@ -6,4 +6,4 @@ object Test extends App { val tb = cm.mkToolBox() val c = tb.parse("object C") println(showRaw(tb.typecheck(c), printKinds = true)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6410.scala b/tests/pending/run/t6410.scala index 2a001b47a..7d25c2485 100644 --- a/tests/pending/run/t6410.scala +++ b/tests/pending/run/t6410.scala @@ -6,4 +6,4 @@ object Test extends App { println(x) val y = collection.parallel.immutable.ParVector.range(1,10) groupBy { _ % 2 } mapValues { _.size } println(y) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6411a.scala b/tests/pending/run/t6411a.scala index 46c88d929..aaf3c39d8 100644 --- a/tests/pending/run/t6411a.scala +++ b/tests/pending/run/t6411a.scala @@ -78,4 +78,4 @@ object Test extends App { // test("zv_6", new Z("6")) test("zni_7", new Z(7)) test("zns_8", new Z("8")) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6411b.scala b/tests/pending/run/t6411b.scala index b5c3bf873..f303eb6ec 100644 --- a/tests/pending/run/t6411b.scala +++ b/tests/pending/run/t6411b.scala @@ -9,4 +9,4 @@ object Test extends App { val ctor = typeOf[Bar].decl(termNames.CONSTRUCTOR).asMethod val ctorm = cm.reflectConstructor(ctor) println(ctorm(Foo(3))) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6443-by-name.scala b/tests/pending/run/t6443-by-name.scala index bfd9bf979..3060a22b4 100644 --- a/tests/pending/run/t6443-by-name.scala +++ b/tests/pending/run/t6443-by-name.scala @@ -1,6 +1,6 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { def foo = {println("foo"); 0} lazyDep(X)(foo) } @@ -10,7 +10,7 @@ object Test { } object X extends T { type U = Int } - def lazyDep(t: T)(u: => t.U) { + def lazyDep(t: T)(u: => t.U): Unit = { println("1") u u diff --git a/tests/pending/run/t6443-varargs.scala b/tests/pending/run/t6443-varargs.scala index 9cbae3e99..006e33244 100644 --- a/tests/pending/run/t6443-varargs.scala +++ b/tests/pending/run/t6443-varargs.scala @@ -1,6 +1,6 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { def foo = {println("foo"); 0} lazyDep(X)(foo) } @@ -10,7 +10,7 @@ object Test { } object X extends T { type U = Int } - def lazyDep(t: T)(us: t.U*) { + def lazyDep(t: T)(us: t.U*): Unit = { List(us: _*) } } diff --git a/tests/pending/run/t6443.scala b/tests/pending/run/t6443.scala index 3ab8c345f..d3eb9bb0d 100644 --- a/tests/pending/run/t6443.scala +++ b/tests/pending/run/t6443.scala @@ -9,7 +9,7 @@ trait A { def bar: Unit = foo(s)(s) } object B extends A { - def foo(d: String)(d2: d.type): D forSome { type D <: S; type S <: Derived } = {d2.isEmpty; null} // Bridge method required here! + def foo(d: String)(d2: d.type): D forSome { type D <: Derived; type S <: Derived } = {d2.isEmpty; null} // Bridge method required here! } object Test extends App { diff --git a/tests/pending/run/t6448.scala b/tests/pending/run/t6448.scala index d0faaa956..48beeafc2 100644 --- a/tests/pending/run/t6448.scala +++ b/tests/pending/run/t6448.scala @@ -8,12 +8,12 @@ object Test { def apply(i: Int) = synchronized {count += 1; true} } - def testing(label: String)(body: => Any) { + def testing(label: String)(body: => Any): Unit = { println(s"\n=$label=") println(body) } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { testing("List.collect")(List(1, 2) collect { case x if f(x) && x < 2 => x}) testing("List.collectFirst")(List(1, 2) collectFirst { case x if f(x) && x < 2 => x}) testing("Option.collect")(Some(1) collect { case x if f(x) && x < 2 => x}) diff --git a/tests/pending/run/t6467.scala b/tests/pending/run/t6467.scala index dc93b69fd..0ee8699d6 100644 --- a/tests/pending/run/t6467.scala +++ b/tests/pending/run/t6467.scala @@ -8,7 +8,7 @@ import collection._ object Test extends App { - def compare(s1: String, s2: String) { + def compare(s1: String, s2: String): Unit = { assert(s1 == s2, s1 + "\nvs.\n" + s2) } @@ -17,4 +17,4 @@ object Test extends App { compare(Seq(0 until 100: _*).aggregate(new java.lang.StringBuffer)(_ append _, _ append _).toString, (0 until 100).mkString) compare(Seq(0 until 100: _*).par.aggregate(new java.lang.StringBuffer)(_ append _, _ append _).toString, (0 until 100).mkString) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6481.scala b/tests/pending/run/t6481.scala index 125da3b15..8bbf5cf95 100644 --- a/tests/pending/run/t6481.scala +++ b/tests/pending/run/t6481.scala @@ -1,12 +1,12 @@ abstract class foo(a: Int, b: Int) extends scala.DelayedInit { - def delayedInit(x: => Unit) { + def delayedInit(x: => Unit): Unit = { println("delayed init"); x } } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new foo(1, 2) { println("new foo(1, 2)") } new foo(b = 2, a = 1) { println("new foo(b = 2, a = 1)") } } diff --git a/tests/pending/run/t6488.scala b/tests/pending/run/t6488.scala index e234876fb..559164044 100644 --- a/tests/pending/run/t6488.scala +++ b/tests/pending/run/t6488.scala @@ -22,7 +22,7 @@ object Test { // Show that no uncaught exceptions are thrown on spawned I/O threads // when the process is destroyed. The default handler will print // stack traces in the failing case. - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { if (args.nonEmpty && args(0) == "data") data() else @@ -30,7 +30,7 @@ object Test { } // fork the data spewer, wait for input, then destroy the process - def test() { + def test(): Unit = { val f = new File(javaHome, "bin").listFiles.sorted filter (_.getName startsWith "java") find (_.canExecute) getOrElse { // todo signal test runner that test is skipped new File("/bin/ls") // innocuous @@ -56,7 +56,7 @@ object Test { } // spew something - def data() { + def data(): Unit = { def filler = "." * 100 for (i <- 1 to 1000) Console println s"Outputting data line $i $filler" diff --git a/tests/pending/run/t6506.scala b/tests/pending/run/t6506.scala index 04d77c3c1..64a097b6b 100644 --- a/tests/pending/run/t6506.scala +++ b/tests/pending/run/t6506.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new WL(new {} #:: S) with T } object S { def #::(a: Any): Any = () } diff --git a/tests/pending/run/t657.scala b/tests/pending/run/t657.scala index e76b0292d..ea2b008b3 100644 --- a/tests/pending/run/t657.scala +++ b/tests/pending/run/t657.scala @@ -2,7 +2,7 @@ import scala.language.{ implicitConversions } abstract class BaseList { type Node <: NodeImpl; - implicit def convertNode(ni : NodeImpl) = ni.asInstanceOf[Node]; + implicit def convertNode(ni : NodeImpl): BaseList.this.Node = ni.asInstanceOf[Node]; abstract class NodeImpl; } abstract class LinkedList extends BaseList { @@ -31,7 +31,7 @@ trait Matcher extends PrecedenceParser { trait NodeImpl extends super.NodeImpl; type Matchable <: Node with MatchableImpl; - implicit def convertMatchable(m : MatchableImpl) = m.asInstanceOf[Matchable]; + implicit def convertMatchable(m : MatchableImpl): Matcher.this.Matchable = m.asInstanceOf[Matchable]; trait MatchableImpl extends NodeImpl { override def chop : Node = { Console.println("passed"); super.chop; diff --git a/tests/pending/run/t6591_7.scala b/tests/pending/run/t6591_7.scala index 914842e61..ee1fcbae6 100644 --- a/tests/pending/run/t6591_7.scala +++ b/tests/pending/run/t6591_7.scala @@ -24,4 +24,4 @@ object Test extends App { } new C() } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6622.scala b/tests/pending/run/t6622.scala index de8ffa01b..cd52a5d06 100644 --- a/tests/pending/run/t6622.scala +++ b/tests/pending/run/t6622.scala @@ -37,7 +37,7 @@ object O4 { object Test extends App { - def check(desc: String, clazz: Class[_]) { + def check(desc: String, clazz: Class[_]): Unit = { println(s" $desc isMemberClass = ${clazz.isMemberClass}, ${clazz.getEnclosingMethod}") println(reflect.runtime.currentMirror.classSymbol(clazz)) } diff --git a/tests/pending/run/t6628.scala b/tests/pending/run/t6628.scala index 84524a7a3..bc87c1250 100644 --- a/tests/pending/run/t6628.scala +++ b/tests/pending/run/t6628.scala @@ -1,6 +1,6 @@ object Test { def coll = new Traversable[String] { - override def foreach[U](f:String=>U) { f("1") } + override def foreach[U](f:String=>U): Unit = { f("1") } } val dropped = coll.view drop 1 diff --git a/tests/pending/run/t6633.scala b/tests/pending/run/t6633.scala index bd993c8d8..196f8bfc6 100644 --- a/tests/pending/run/t6633.scala +++ b/tests/pending/run/t6633.scala @@ -30,4 +30,4 @@ object Test extends App { println("length OK") else println("length FAILED: " + len) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6634.scala b/tests/pending/run/t6634.scala index 759e6d519..32daed09a 100644 --- a/tests/pending/run/t6634.scala +++ b/tests/pending/run/t6634.scala @@ -77,4 +77,4 @@ object Test extends App { else println("!!! length FAILED: " + len) println() } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6646.scala b/tests/pending/run/t6646.scala index a377ac274..b96851077 100644 --- a/tests/pending/run/t6646.scala +++ b/tests/pending/run/t6646.scala @@ -4,7 +4,7 @@ case object PrimaryKey extends ColumnOption case object lower extends ColumnOption object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val l = List(PrimaryKey, NoNull, lower) // withFilter must be generated in these diff --git a/tests/pending/run/t6673.scala b/tests/pending/run/t6673.scala index 115bbdf23..a4ae4e652 100644 --- a/tests/pending/run/t6673.scala +++ b/tests/pending/run/t6673.scala @@ -2,4 +2,4 @@ object Test extends App { def foo(f: String => Array[String])(s: String) = f(s) val test = foo(Array(_)) _ println(test("x").toList) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6677.scala b/tests/pending/run/t6677.scala index e6eaf6a49..d8b012623 100644 --- a/tests/pending/run/t6677.scala +++ b/tests/pending/run/t6677.scala @@ -1,18 +1,18 @@ class Test { val cm: reflect.runtime.universe.Mirror = reflect.runtime.currentMirror - def error { + def error: Unit = { new cm.universe.Traverser // java.lang.VerifyError: (class: Test, method: error signature: ()V) Incompatible object argument for function call } - def okay1 { + def okay1: Unit = { val cm: reflect.runtime.universe.Mirror = reflect.runtime.currentMirror new cm.universe.Traverser } - def okay2 { + def okay2: Unit = { val cm: reflect.runtime.universe.Mirror = reflect.runtime.currentMirror val u: reflect.runtime.universe.type = cm.universe new u.Traverser @@ -20,7 +20,7 @@ class Test { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new Test().error new Test().okay1 new Test().okay2 diff --git a/tests/pending/run/t6677b.scala b/tests/pending/run/t6677b.scala index e4fe5e372..2106b2d6d 100644 --- a/tests/pending/run/t6677b.scala +++ b/tests/pending/run/t6677b.scala @@ -15,7 +15,7 @@ trait B extends U { class C { val ab: A with B = new A with B // `B with A` works. - def foo { + def foo: Unit = { // fails new ab.u.X @@ -25,7 +25,7 @@ class C { } } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { // java.lang.NoSuchMethodError: A.u()LB$U11; // at C.foo(t6677b.scala:23) new C().foo diff --git a/tests/pending/run/t6690.scala b/tests/pending/run/t6690.scala index 15b1817e8..d7e041faf 100644 --- a/tests/pending/run/t6690.scala +++ b/tests/pending/run/t6690.scala @@ -10,7 +10,7 @@ object Test extends App { ml.asInstanceOf[{def first0: mutable.LinkedList[Int]}].first0 val f = mutable.Queue[Int]() - def check(desc: String) { + def check(desc: String): Unit = { assert(f.length == 0, s"$desc: non empty: $f") assert(last0(f).isEmpty, s"$desc: last0 leak: ${last0(f)}") assert(first0(f).isEmpty, s"$desc: first0 leak: ${last0(f)}") diff --git a/tests/pending/run/t6719.scala b/tests/pending/run/t6719.scala index 847929a95..efde06435 100644 --- a/tests/pending/run/t6719.scala +++ b/tests/pending/run/t6719.scala @@ -5,4 +5,4 @@ object Test extends App { val tb = cm.mkToolBox() val tree = tb.parse("(); val res = 0") println(tb.eval(tree)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6725-1.scala b/tests/pending/run/t6725-1.scala index a167ef8aa..33a4ac1e1 100644 --- a/tests/pending/run/t6725-1.scala +++ b/tests/pending/run/t6725-1.scala @@ -2,4 +2,4 @@ object Test extends App { val a = 1 val s = f"$a%s%n$a%s" println(s) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6725-2.scala b/tests/pending/run/t6725-2.scala index e033cf5ea..63d231ff0 100644 --- a/tests/pending/run/t6725-2.scala +++ b/tests/pending/run/t6725-2.scala @@ -3,4 +3,4 @@ object Test extends App { println(f"aaaa%n") println(f"%naaaa") println(f"aaaa%naaaa") -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6732.scala b/tests/pending/run/t6732.scala index fdc1ab04e..23c5f203d 100644 --- a/tests/pending/run/t6732.scala +++ b/tests/pending/run/t6732.scala @@ -9,4 +9,4 @@ object Test extends App { test(ScalaPackageClass) test(ListModule) test(ListModule.moduleClass) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6733.scala b/tests/pending/run/t6733.scala index df1946a9d..27efadca3 100644 --- a/tests/pending/run/t6733.scala +++ b/tests/pending/run/t6733.scala @@ -32,4 +32,4 @@ trait Foo { object Test extends App { typeOf[Foo].decls.sorted.foreach(m => println(s"$m: isPrivateThis = ${m.isPrivateThis}, isProtectedThis = ${m.isProtectedThis}")) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6863.scala b/tests/pending/run/t6863.scala index 7210ebc01..2c3d124e2 100644 --- a/tests/pending/run/t6863.scala +++ b/tests/pending/run/t6863.scala @@ -90,7 +90,7 @@ object Test { } assert({ () => x }.apply == "42") } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { lazyVal() ident() apply() diff --git a/tests/pending/run/t6900.scala b/tests/pending/run/t6900.scala index a29d38812..090c908f6 100644 --- a/tests/pending/run/t6900.scala +++ b/tests/pending/run/t6900.scala @@ -33,4 +33,4 @@ object Test extends App { assert(new Bug().f(null, null) == null) assert(new Bug().g(null)(null) == null) assert(new Bug().h(null)(null) == Nil) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t6908.scala b/tests/pending/run/t6908.scala index a641de96b..da37cb0bb 100644 --- a/tests/pending/run/t6908.scala +++ b/tests/pending/run/t6908.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val set = collection.mutable.Set("1", null, "3").par assert( set exists (_ eq null) ) } diff --git a/tests/pending/run/t6957.scala b/tests/pending/run/t6957.scala index d0bf8e7b5..4637d4337 100644 --- a/tests/pending/run/t6957.scala +++ b/tests/pending/run/t6957.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { class Foo class Parent(f:Foo) class Child extends Parent({val x=new Foo{}; x}) diff --git a/tests/pending/run/t6968.scala b/tests/pending/run/t6968.scala index b5cadfd9e..c4e47ba0e 100644 --- a/tests/pending/run/t6968.scala +++ b/tests/pending/run/t6968.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val mixedList = List(1,(1,2),4,(3,1),(5,4),6) val as = for((a,b) <- mixedList) yield a println(as.mkString(", ")) diff --git a/tests/pending/run/t6969.scala b/tests/pending/run/t6969.scala index c4561b442..25791454e 100644 --- a/tests/pending/run/t6969.scala +++ b/tests/pending/run/t6969.scala @@ -18,7 +18,7 @@ object Test { try f(map) catch { case t: NullPointerException => println(s"Failed at $id/$iteration") ; throw t } choke() } - override def run() { + override def run(): Unit = { 1 to 50 foreach g } } diff --git a/tests/pending/run/t7015.scala b/tests/pending/run/t7015.scala index 37a73a9fc..af07f5f7e 100644 --- a/tests/pending/run/t7015.scala +++ b/tests/pending/run/t7015.scala @@ -46,4 +46,4 @@ class B extends A { object B { val nullCompanionField = null -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7039.scala b/tests/pending/run/t7039.scala index 475c4ae26..7ca4ac497 100644 --- a/tests/pending/run/t7039.scala +++ b/tests/pending/run/t7039.scala @@ -6,6 +6,6 @@ object Test extends App { null match { case UnapplySeqTest(5) => println("uh-oh") case UnapplySeqTest(5, 1) => println("Matched!") // compiles - case UnapplySeqTest(5, xs @ _*) => println("toooo long: "+ (xs: Seq[Int])) + case UnapplySeqTest(5, xs : _*) => println("toooo long: "+ (xs: Seq[Int])) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7045.scala b/tests/pending/run/t7045.scala index 5b31a8b77..305adeb3e 100644 --- a/tests/pending/run/t7045.scala +++ b/tests/pending/run/t7045.scala @@ -9,4 +9,4 @@ object Test extends App { println(d.selfType) d.info println(d.selfType) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7046.scala b/tests/pending/run/t7046.scala index f15545f59..761e5d178 100644 --- a/tests/pending/run/t7046.scala +++ b/tests/pending/run/t7046.scala @@ -10,4 +10,4 @@ object Test extends App { println(c.knownDirectSubclasses) c.info println(c.knownDirectSubclasses) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7088.scala b/tests/pending/run/t7088.scala index 5f0114b94..3f51ed48e 100644 --- a/tests/pending/run/t7088.scala +++ b/tests/pending/run/t7088.scala @@ -2,7 +2,7 @@ object Test { type Tag[X] = {type Tag = X} type TaggedArray[T] = Array[T] with Tag[Any] - def method[T: scala.reflect.ClassTag](a: TaggedArray[T], value: T) { + def method[T: scala.reflect.ClassTag](a: TaggedArray[T], value: T): Unit = { a.update(0, value) a foreach println } diff --git a/tests/pending/run/t7151.scala b/tests/pending/run/t7151.scala index f6492ba43..8500eb3c3 100644 --- a/tests/pending/run/t7151.scala +++ b/tests/pending/run/t7151.scala @@ -5,7 +5,7 @@ object Test { final case class InnerCase() final class InnerNonCase() - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { def checkFinal(clazz: Class[_]) = println(s"${clazz} isFinal = ${isFinal(clazz.getModifiers())}") diff --git a/tests/pending/run/t7181.scala b/tests/pending/run/t7181.scala index 489ec313f..dc03d299a 100644 --- a/tests/pending/run/t7181.scala +++ b/tests/pending/run/t7181.scala @@ -16,7 +16,7 @@ case class UncaughtException(action: Action) extends RuntimeException case class CaughtException(action: Action) extends RuntimeException object Test extends App { - def test(action: Action, expectException: Boolean = false) { + def test(action: Action, expectException: Boolean = false): Unit = { var gotException = false val result = try driver(action) diff --git a/tests/pending/run/t7231.scala b/tests/pending/run/t7231.scala index 7d6bc81f3..d8f9fdf6f 100644 --- a/tests/pending/run/t7231.scala +++ b/tests/pending/run/t7231.scala @@ -8,4 +8,4 @@ object Test extends App { println(foo(bar)) // this line worked but good to have a double check println(baz(bar)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7242.scala b/tests/pending/run/t7242.scala index c99533614..1d655d815 100644 --- a/tests/pending/run/t7242.scala +++ b/tests/pending/run/t7242.scala @@ -36,7 +36,7 @@ class CrashTest2 { class CrashTest3 { def foo = () - def meth() { + def meth(): Unit = { trait CrashTestTable { def cols = foo } diff --git a/tests/pending/run/t7291.scala b/tests/pending/run/t7291.scala index ca44e9669..ee22b581e 100644 --- a/tests/pending/run/t7291.scala +++ b/tests/pending/run/t7291.scala @@ -16,7 +16,7 @@ elem: Fooable[T]): Fooable[Coll[T]] = { println("traversable") new Fooable[Coll[T]]{} } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { implicitly[Fooable[List[Any]]] } } diff --git a/tests/pending/run/t7325.scala b/tests/pending/run/t7325.scala index 26f6bc6ef..0b02d5348 100644 --- a/tests/pending/run/t7325.scala +++ b/tests/pending/run/t7325.scala @@ -22,4 +22,4 @@ object Test extends App { println(f"${0}%n") println(f"${0}%d%n") -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7326.scala b/tests/pending/run/t7326.scala index ed9471ea8..ce3fa122a 100644 --- a/tests/pending/run/t7326.scala +++ b/tests/pending/run/t7326.scala @@ -3,11 +3,11 @@ import scala.collection.immutable.HashSet object Test extends App { - def testCorrectness() { + def testCorrectness(): Unit = { // a key that has many hashCode collisions case class Collision(i: Int) { override def hashCode = i / 5 } - def subsetTest[T](emptyA:Set[T], emptyB:Set[T], mkKey:Int => T, n:Int) { + def subsetTest[T](emptyA:Set[T], emptyB:Set[T], mkKey:Int => T, n:Int): Unit = { val outside = mkKey(n + 1) for(i <- 0 to n) { val a = emptyA ++ (0 until i).map(mkKey) diff --git a/tests/pending/run/t7328.scala b/tests/pending/run/t7328.scala index 56956b489..1e7b19674 100644 --- a/tests/pending/run/t7328.scala +++ b/tests/pending/run/t7328.scala @@ -15,4 +15,4 @@ object Test extends App { println(im.reflectField(foo).get) // incorrectly gives java.lang.Integer(3) not Foo(3) im.reflectField(foo).set(Foo(5)) // java.lang.IllegalArgumentException: Can not set int field Bar.foo to Foo println(im.reflectMethod(foo)()) // incorrectly gives java.lang.Integer(3) not Foo(3) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7331a.scala b/tests/pending/run/t7331a.scala index 1851945e6..cd9d2aa73 100644 --- a/tests/pending/run/t7331a.scala +++ b/tests/pending/run/t7331a.scala @@ -7,4 +7,4 @@ object Test extends App { val tree = tb.parse("x") println(tree.pos) println(tree.pos.source.content.length) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7331b.scala b/tests/pending/run/t7331b.scala index 052656d11..e499fc0b3 100644 --- a/tests/pending/run/t7331b.scala +++ b/tests/pending/run/t7331b.scala @@ -8,4 +8,4 @@ object Test extends App { catch { case ToolBoxError(msg, _) => println(msg) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7331c.scala b/tests/pending/run/t7331c.scala index 75873afcd..cd5cf88b0 100644 --- a/tests/pending/run/t7331c.scala +++ b/tests/pending/run/t7331c.scala @@ -8,4 +8,4 @@ object Test extends App { println(showRaw(tree)) println(tree.pos) println(tree.impl.self.pos) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7336.scala b/tests/pending/run/t7336.scala index 21b0be544..e2f17e115 100644 --- a/tests/pending/run/t7336.scala +++ b/tests/pending/run/t7336.scala @@ -10,7 +10,7 @@ import scala.concurrent.duration.Duration * after it is created and the test should complete without problems. */ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { def loop(i: Int, arraySize: Int): Future[Unit] = { val array = new Array[Byte](arraySize) Future.successful(i).flatMap { i => @@ -28,4 +28,4 @@ object Test { val tooManyArrays = (Runtime.getRuntime().totalMemory() / arraySize).toInt + 1 Await.ready(loop(tooManyArrays, arraySize), Duration.Inf) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7341.scala b/tests/pending/run/t7341.scala index ffea7f918..cd177d7f7 100755 --- a/tests/pending/run/t7341.scala +++ b/tests/pending/run/t7341.scala @@ -1,7 +1,7 @@ object Obj { private var cache: Any = () def returning(f: () => Unit) = () - def foo { + def foo: Unit = { returning(() => cache = ()) } diff --git a/tests/pending/run/t7407.scala b/tests/pending/run/t7407.scala index cf6760212..51fb2214f 100644 --- a/tests/pending/run/t7407.scala +++ b/tests/pending/run/t7407.scala @@ -1,7 +1,7 @@ // SI-7407 object Test { - def main(args: Array[String]) { println(foo) } + def main(args: Array[String]): Unit = { println(foo) } def foo: String = { try return "Hello" finally 10 match {case x => ()} diff --git a/tests/pending/run/t7407b.scala b/tests/pending/run/t7407b.scala index b0c00878b..79f52a6fc 100644 --- a/tests/pending/run/t7407b.scala +++ b/tests/pending/run/t7407b.scala @@ -1,6 +1,6 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println(foo(true)) println(foo(false)) } diff --git a/tests/pending/run/t7436.scala b/tests/pending/run/t7436.scala index 867a931e0..9627e38f5 100644 --- a/tests/pending/run/t7436.scala +++ b/tests/pending/run/t7436.scala @@ -3,7 +3,7 @@ class A(val p: Int*) class B(val p1: Int) extends A(p1) object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new B(1).p1 // threw java.lang.ClassCastException: scala.collection.mutable.WrappedArray$ofInt cannot be cast to java.lang.Integer } } diff --git a/tests/pending/run/t7533.scala b/tests/pending/run/t7533.scala index c7bd8e8d4..308ad493d 100644 --- a/tests/pending/run/t7533.scala +++ b/tests/pending/run/t7533.scala @@ -35,4 +35,4 @@ object Test extends App { test[T] test[D] test[M.type] -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7556/Test_2.scala b/tests/pending/run/t7556/Test_2.scala index a78c917ed..4dd482ff3 100644 --- a/tests/pending/run/t7556/Test_2.scala +++ b/tests/pending/run/t7556/Test_2.scala @@ -1,7 +1,7 @@ import scala.reflect.runtime.universe._ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val mc = new MegaClass val anns = mc.getClass.getAnnotations.map(_.annotationType.getName).toList.sorted println(s"class annotations: $anns") diff --git a/tests/pending/run/t7570a.scala b/tests/pending/run/t7570a.scala index b8b4ddeaf..7a264ce8d 100644 --- a/tests/pending/run/t7570a.scala +++ b/tests/pending/run/t7570a.scala @@ -8,4 +8,4 @@ object Test extends App { val tb = cm.mkToolBox() val csym = tb.define(q"""class C { override def toString = "C" }""") println(tb.eval(q"new $csym")) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7570b.scala b/tests/pending/run/t7570b.scala index 7d4ade523..df41d9d27 100644 --- a/tests/pending/run/t7570b.scala +++ b/tests/pending/run/t7570b.scala @@ -15,4 +15,4 @@ object Test extends App { } catch { case ToolBoxError(message, _) => println(s"compilation failed: $message") } -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7570c.scala b/tests/pending/run/t7570c.scala index a5bdbffe1..f8ba0fea1 100644 --- a/tests/pending/run/t7570c.scala +++ b/tests/pending/run/t7570c.scala @@ -10,4 +10,4 @@ object Test extends App { println((csym, csym.isClass, csym.isModule, csym.isModuleClass)) val dsym = tb.define(q"""object D { override def toString = "D" }""".asInstanceOf[ModuleDef]) println((dsym, dsym.isClass, dsym.isModule, dsym.isModuleClass)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7657/Test_2.scala b/tests/pending/run/t7657/Test_2.scala index 5cc46b6aa..2c7422be6 100644 --- a/tests/pending/run/t7657/Test_2.scala +++ b/tests/pending/run/t7657/Test_2.scala @@ -3,4 +3,4 @@ object Test extends App { println(c.t()) println((c: T).t()) println((c: A).t()) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t7763.scala b/tests/pending/run/t7763.scala index 638077e64..a76f52b74 100644 --- a/tests/pending/run/t7763.scala +++ b/tests/pending/run/t7763.scala @@ -1,7 +1,7 @@ object Test { class A; class B - def main(args: Array[String]) { - def noExpectedType() { + def main(args: Array[String]): Unit = { + def noExpectedType(): Unit = { a().asInstanceOf[B] // cast elided! } def withExpectedType(): B = { diff --git a/tests/pending/run/t7775.scala b/tests/pending/run/t7775.scala index 48b0d8997..bc6a67d0e 100644 --- a/tests/pending/run/t7775.scala +++ b/tests/pending/run/t7775.scala @@ -6,7 +6,7 @@ import ExecutionContext.Implicits.global // WrappedProperties#systemProperties iterated directly over the mutable // global system properties map. object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val tries = 1000 // YMMV val compiler = Future { for(_ <- 1 to tries) new Settings(_ => {}) diff --git a/tests/pending/run/t7859/B_2.scala b/tests/pending/run/t7859/B_2.scala index 6b23af3ab..052322ef6 100644 --- a/tests/pending/run/t7859/B_2.scala +++ b/tests/pending/run/t7859/B_2.scala @@ -9,28 +9,28 @@ object B { // // See also SI-6601. object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { unboxA unboxA1 unboxA2 unboxB } - def unboxA { + def unboxA: Unit = { val o: Some[A] = Some(A.Const) val a = o.get def id(a: A): A = a id(a) } - def unboxA1 { + def unboxA1: Unit = { val o: Some[A1] = Some(new A1(0)) val a = o.get def id(a: A1): A1 = a id(a) } - def unboxA2 { + def unboxA2: Unit = { import p.A2 val o: Some[A2] = Some(new A2(0)) val a = o.get @@ -38,7 +38,7 @@ object Test { id(a) } - def unboxB { + def unboxB: Unit = { val o: Some[B] = Some(B.Const) val b = o.get def id(b: B): B = b diff --git a/tests/pending/run/t7992.scala b/tests/pending/run/t7992.scala index fde231b96..9753765c0 100644 --- a/tests/pending/run/t7992.scala +++ b/tests/pending/run/t7992.scala @@ -14,7 +14,7 @@ class D extends C { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new D().foo } } diff --git a/tests/pending/run/t7992b.scala b/tests/pending/run/t7992b.scala index 6fe1f990d..78891fd69 100644 --- a/tests/pending/run/t7992b.scala +++ b/tests/pending/run/t7992b.scala @@ -12,7 +12,7 @@ class E extends C { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { new E().foo } } diff --git a/tests/pending/run/t8017/value-class-lambda.scala b/tests/pending/run/t8017/value-class-lambda.scala index 370023b19..f247e35f6 100644 --- a/tests/pending/run/t8017/value-class-lambda.scala +++ b/tests/pending/run/t8017/value-class-lambda.scala @@ -1,5 +1,5 @@ object Test { - def testC { + def testC: Unit = { val f1 = (c: C) => c.value val f2 = (x: Int) => new C(x) val f3 = (c1: C) => (c2: C) => (c1, c2) @@ -10,7 +10,7 @@ object Test { assert(result == 2) } - def testD { + def testD: Unit = { val f1 = (c: D) => c.value val f2 = (x: String) => new D(x) val f3 = (c1: D) => (c2: D) => (c1, c2) @@ -21,7 +21,7 @@ object Test { assert(result == "2") } - def testE { + def testE: Unit = { val f1 = (c: E[Int]) => c.value val f2 = (x: Int) => new E(x) val f3 = (c1: E[Int]) => (c2: E[Int]) => (c1, c2) @@ -32,7 +32,7 @@ object Test { assert(result == 2) } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { testC testD testE diff --git a/tests/pending/run/t8091.scala b/tests/pending/run/t8091.scala index cd412d4c2..56af4f7de 100644 --- a/tests/pending/run/t8091.scala +++ b/tests/pending/run/t8091.scala @@ -1,4 +1,4 @@ object Test extends App { val result = "börk börk" flatMap (ch ⇒ if (ch > 127) f"&#x${ch}%04x;" else "" + ch) println(result) -}
\ No newline at end of file +} diff --git a/tests/pending/run/t8153.scala b/tests/pending/run/t8153.scala index f9b223f97..0cbfb5b5a 100644 --- a/tests/pending/run/t8153.scala +++ b/tests/pending/run/t8153.scala @@ -8,7 +8,7 @@ object Test { it.mkString } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println(f()) } } diff --git a/tests/pending/run/t8188.scala b/tests/pending/run/t8188.scala index ec3a968e4..9ee542f2a 100644 --- a/tests/pending/run/t8188.scala +++ b/tests/pending/run/t8188.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { import java.io.ByteArrayInputStream import java.io.ByteArrayOutputStream import java.io.ObjectInputStream diff --git a/tests/pending/run/t8190.scala b/tests/pending/run/t8190.scala index 17ff83c71..e1bcc8fae 100644 --- a/tests/pending/run/t8190.scala +++ b/tests/pending/run/t8190.scala @@ -207,4 +207,4 @@ object Test extends App with Overloads { record(test(null: Modifiers)) record(test(null: TreeCopier)) check() -}
\ No newline at end of file +} diff --git a/tests/pending/run/t8197.scala b/tests/pending/run/t8197.scala index 910a3ebc8..27212cbbd 100644 --- a/tests/pending/run/t8197.scala +++ b/tests/pending/run/t8197.scala @@ -3,7 +3,7 @@ class A class B class Foo(val x: A = null) { - def this(bla: B*) { + def this(bla: B*) = { this(new A) } } diff --git a/tests/pending/run/t8199.scala b/tests/pending/run/t8199.scala index 50994159e..265931cca 100644 --- a/tests/pending/run/t8199.scala +++ b/tests/pending/run/t8199.scala @@ -35,14 +35,14 @@ trait trt01234567890 { def x = Test.checkCallerImplClassName() } } object Test extends App { - def check(c: Class[_]) { + def check(c: Class[_]): Unit = { checkClassName(c.getName) } - def checkClassName(name: String) { + def checkClassName(name: String): Unit = { val defaultMaxClassFileLength = 255 assert((name + ".class").length <= defaultMaxClassFileLength, name) } - def checkCallerImplClassName() { + def checkCallerImplClassName(): Unit = { val name = Thread.currentThread.getStackTrace.apply(2).getClassName assert(name.contains("$class")) Test.checkClassName(name) diff --git a/tests/pending/run/t8233-bcode.scala b/tests/pending/run/t8233-bcode.scala index 72d013e55..771e4cf0c 100644 --- a/tests/pending/run/t8233-bcode.scala +++ b/tests/pending/run/t8233-bcode.scala @@ -1,12 +1,12 @@ object Test { def bar(s: String) = s; val o: Option[Null] = None - def nullReference { + def nullReference: Unit = { val a: Null = o.get bar(a) // Was: VerifyError under GenICode } - def literal { + def literal: Unit = { val a: Null = null bar(a) } diff --git a/tests/pending/run/t8233.scala b/tests/pending/run/t8233.scala index 97a98a2e2..3896a7cc6 100644 --- a/tests/pending/run/t8233.scala +++ b/tests/pending/run/t8233.scala @@ -1,12 +1,12 @@ object Test { def bar(s: String) = s; val o: Option[Null] = None - def nullReference { + def nullReference: Unit = { val a: Null = o.get bar(a) // Was: VerifyError under GenICode } - def literal { + def literal: Unit = { val a: Null = null bar(a) } diff --git a/tests/pending/run/t8245.scala b/tests/pending/run/t8245.scala index d44defbb9..5a6fb9ff7 100644 --- a/tests/pending/run/t8245.scala +++ b/tests/pending/run/t8245.scala @@ -8,7 +8,7 @@ object Test { i + 1 } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { assert(foo(None) == -1) } } diff --git a/tests/pending/run/t8395.scala b/tests/pending/run/t8395.scala index 257055061..f2b687e2b 100644 --- a/tests/pending/run/t8395.scala +++ b/tests/pending/run/t8395.scala @@ -3,7 +3,7 @@ val s @ (_s: String) = x x } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { assert(baz("1") == "1") } } diff --git a/tests/pending/run/t8549.scala b/tests/pending/run/t8549.scala index cb254e381..23d9be7aa 100644 --- a/tests/pending/run/t8549.scala +++ b/tests/pending/run/t8549.scala @@ -20,12 +20,12 @@ object Test extends App { printBase64Binary(bos.toByteArray()) } - def amend(file: File)(f: String => String) { + def amend(file: File)(f: String => String): Unit = { file.writeAll(f(file.slurp)) } def quote(s: String) = List("\"", s, "\"").mkString - def patch(file: File, line: Int, prevResult: String, result: String) { + def patch(file: File, line: Int, prevResult: String, result: String): Unit = { amend(file) { content => content.lines.toList.zipWithIndex.map { @@ -39,7 +39,7 @@ object Test extends App { } } - def updateComment(file: File) { + def updateComment(file: File): Unit = { val timestamp = { import java.text.SimpleDateFormat val sdf = new SimpleDateFormat("yyyyMMdd-HH:mm:ss") @@ -60,13 +60,13 @@ object Test extends App { in.readObject() } - def checkRoundTrip[T <: AnyRef](instance: T)(f: T => AnyRef) { + def checkRoundTrip[T <: AnyRef](instance: T)(f: T => AnyRef): Unit = { val result = serialize(instance) val reconstituted = deserialize(result).asInstanceOf[T] assert(f(instance) == f(reconstituted), (f(instance), f(reconstituted))) } - def check[T <: AnyRef](instance: => T)(prevResult: String, f: T => AnyRef = (x: T) => x) { + def check[T <: AnyRef](instance: => T)(prevResult: String, f: T => AnyRef = (x: T) => x): Unit = { val result = serialize(instance) overwrite match { case Some(f) => diff --git a/tests/pending/run/t8549b.scala b/tests/pending/run/t8549b.scala index 1e1bf2c0b..c9a086233 100644 --- a/tests/pending/run/t8549b.scala +++ b/tests/pending/run/t8549b.scala @@ -7,7 +7,7 @@ class D object Test extends App { - def checkId(cls: Class[_]) { + def checkId(cls: Class[_]): Unit = { val id = cls.getDeclaredField("serialVersionUID").get(null) assert(id == 42, (cls, id)) } diff --git a/tests/pending/run/t8570.scala b/tests/pending/run/t8570.scala index bbe83e908..f1f752602 100644 --- a/tests/pending/run/t8570.scala +++ b/tests/pending/run/t8570.scala @@ -4,7 +4,7 @@ trait Trait40_1 { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { (new Trait40_1 {}).run } } diff --git a/tests/pending/run/t8570a.scala b/tests/pending/run/t8570a.scala index ef116e2a8..b36c34037 100644 --- a/tests/pending/run/t8570a.scala +++ b/tests/pending/run/t8570a.scala @@ -8,7 +8,7 @@ trait T1 extends Trait40_1 { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println((new T1 {}).run) } } diff --git a/tests/pending/run/t8574.scala b/tests/pending/run/t8574.scala index 8c23ada48..9a7f6b2ba 100644 --- a/tests/pending/run/t8574.scala +++ b/tests/pending/run/t8574.scala @@ -16,7 +16,7 @@ object Test extends App { assert(isStrict, cls) } } - def check(x: AnyRef) { + def check(x: AnyRef): Unit = { checkUID(x.getClass, 42) checkStrictFp(x.getClass) } diff --git a/tests/pending/run/t8601.scala b/tests/pending/run/t8601.scala index e1afc23cc..feea6e6c3 100644 --- a/tests/pending/run/t8601.scala +++ b/tests/pending/run/t8601.scala @@ -6,7 +6,7 @@ object Test { def check(x: => Any) = try { x; sys.error("failed to throw divide by zero!") } catch { case _: ArithmeticException => } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { check(idiv(1)) check(ldiv(1L)) check(irem(1)) diff --git a/tests/pending/run/t8601b.scala b/tests/pending/run/t8601b.scala index 9c37ce33d..3816e0b83 100644 --- a/tests/pending/run/t8601b.scala +++ b/tests/pending/run/t8601b.scala @@ -6,7 +6,7 @@ object Test { def check(x: => Any) = try { x; sys.error("failed to throw NPE!") } catch { case _: NullPointerException => } def checkNegSize(x: => Any) = try { x; sys.error("failed to throw NegativeArraySizeException!") } catch { case _: NegativeArraySizeException => } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { check(len(null)) // bug: did not NPE check(load(null)) checkNegSize(newarray(-1)) diff --git a/tests/pending/run/t8601c.scala b/tests/pending/run/t8601c.scala index c487d6825..946a4d4b6 100644 --- a/tests/pending/run/t8601c.scala +++ b/tests/pending/run/t8601c.scala @@ -4,7 +4,7 @@ object Test { def check(x: => Any) = try { x; sys.error("failed to throw NPE!") } catch { case _: NullPointerException => } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { check(loadField(null)) // bug: did not NPE under -Ydead-code check(storeField(null)) diff --git a/tests/pending/run/t8601d.scala b/tests/pending/run/t8601d.scala index ac89963d6..a6962847c 100644 --- a/tests/pending/run/t8601d.scala +++ b/tests/pending/run/t8601d.scala @@ -2,7 +2,7 @@ object Test { def monitor(x: AnyRef): Unit = {x.synchronized(()); ()} def check(x: => Any) = try { x; sys.error("failed to throw NPE") } catch { case _: NullPointerException => } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { check(monitor(null)) } } diff --git a/tests/pending/run/t8607.scala b/tests/pending/run/t8607.scala index 1b8ef9bbd..5ee7e57d5 100644 --- a/tests/pending/run/t8607.scala +++ b/tests/pending/run/t8607.scala @@ -9,7 +9,7 @@ package p1 { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val c = new p1.C(42) c.a /* diff --git a/tests/pending/run/t8611b.scala b/tests/pending/run/t8611b.scala index 2df17c9ca..cb37f0e07 100644 --- a/tests/pending/run/t8611b.scala +++ b/tests/pending/run/t8611b.scala @@ -34,7 +34,7 @@ object Test extends App { testGris() testWorking() - def testGris() { + def testGris(): Unit = { val pipp = NotWorkingTab.b pipp match { case NotWorkingTab.a => ??? @@ -43,7 +43,7 @@ object Test extends App { } } - def testWorking() { + def testWorking(): Unit = { val stuff = WorkingTab.a stuff match { case WorkingTab.a => diff --git a/tests/pending/run/t8637.scala b/tests/pending/run/t8637.scala index 99c8d4c41..8671a6a05 100644 --- a/tests/pending/run/t8637.scala +++ b/tests/pending/run/t8637.scala @@ -6,4 +6,4 @@ object Test extends App { val tb = currentMirror.mkToolBox() tb.compile(q"true > true") tb.typecheck(q"true > true") -}
\ No newline at end of file +} diff --git a/tests/pending/run/t8738.scala b/tests/pending/run/t8738.scala index 6898301db..1683b93b5 100644 --- a/tests/pending/run/t8738.scala +++ b/tests/pending/run/t8738.scala @@ -1,6 +1,6 @@ object Test { def check(a: Range, b: Range) = (a == b) == (a.toList == b.toList) - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val lo = -2 to 2 val hi = lo val step = List(-6,-2,-1,1,2,6) diff --git a/tests/pending/run/t889.scala b/tests/pending/run/t889.scala index c2c173081..f32048819 100644 --- a/tests/pending/run/t889.scala +++ b/tests/pending/run/t889.scala @@ -3,7 +3,7 @@ object Test extends App { val a = List("a") a match { - case Seq("a", "b", rest @ _*) => println("a, b, " + rest) - case Seq(first, rest @ _*) => println("first: " + first + ", rest: " + rest) + case Seq("a", "b", rest : _*) => println("a, b, " + rest) + case Seq(first, rest : _*) => println("first: " + first + ", rest: " + rest) } } diff --git a/tests/pending/run/t8893.scala b/tests/pending/run/t8893.scala index 6fef8ae91..5178226de 100644 --- a/tests/pending/run/t8893.scala +++ b/tests/pending/run/t8893.scala @@ -33,7 +33,7 @@ object Test { } } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { test1 test2 } diff --git a/tests/pending/run/t8933b/Test.scala b/tests/pending/run/t8933b/Test.scala index 46eedd660..7ce239b7d 100644 --- a/tests/pending/run/t8933b/Test.scala +++ b/tests/pending/run/t8933b/Test.scala @@ -3,7 +3,7 @@ class MotherClass extends MixinWithSymbol { } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { (new MotherClass).symbolFromTrait } } diff --git a/tests/pending/run/t978.scala b/tests/pending/run/t978.scala index 3ffac9276..012d57fbe 100644 --- a/tests/pending/run/t978.scala +++ b/tests/pending/run/t978.scala @@ -19,7 +19,7 @@ object Test extends App { testRemove(2) testExists(2) - def testRemove(m: Int) { + def testRemove(m: Int): Unit = { for (x <- 1 to max; if x % m == 0) { val f = new Foo(x) set -= f @@ -28,7 +28,7 @@ object Test extends App { } } - def testExists(m: Int) { + def testExists(m: Int): Unit = { for (x <- 1 to max; if x % m == 1) { val f = new Foo(x) assert(set contains f, "For element: " + f + " set: " + set) diff --git a/tests/pending/run/tcpoly_parseridioms.scala b/tests/pending/run/tcpoly_parseridioms.scala index d22f68b55..6d541996c 100644 --- a/tests/pending/run/tcpoly_parseridioms.scala +++ b/tests/pending/run/tcpoly_parseridioms.scala @@ -103,8 +103,8 @@ trait ParserIdioms extends Parsers with Idioms { // TODO: how can parserIdiom(curry2(_)) be omitted? def expr: Parser[Expr] = parserIdiomFun(curry2(Plus)) <| num <> num |> - implicit def curry2[s,t,u](fun: (s, t)=>u)(a: s)(b: t) = fun(a, b) - implicit def curry3[r,s,t,u](fun: (r,s, t)=>u)(a: r)(b: s)(c: t) = fun(a, b, c) + implicit def curry2[s,t,u](fun: (s, t)=>u)(a: s)(b: t): u = fun(a, b) + implicit def curry3[r,s,t,u](fun: (r,s, t)=>u)(a: r)(b: s)(c: t): u = fun(a, b, c) } object Test extends ParserIdioms with App { diff --git a/tests/pending/run/toolbox_console_reporter.scala b/tests/pending/run/toolbox_console_reporter.scala index ce28086c2..5a3157780 100644 --- a/tests/pending/run/toolbox_console_reporter.scala +++ b/tests/pending/run/toolbox_console_reporter.scala @@ -12,7 +12,7 @@ object Test extends App { toolbox.eval(reify{ object Utils { @deprecated("test", "2.10.0") - def foo { println("hello") } + def foo: Unit = { println("hello") } } Utils.foo diff --git a/tests/pending/run/toolbox_current_run_compiles.scala b/tests/pending/run/toolbox_current_run_compiles.scala index 6ec707464..68760a6f4 100644 --- a/tests/pending/run/toolbox_current_run_compiles.scala +++ b/tests/pending/run/toolbox_current_run_compiles.scala @@ -25,4 +25,4 @@ object Test extends App { println(pkg.Macros.compiles[C]) println(pkg.Macros.compiles[Object]) }""")) -}
\ No newline at end of file +} diff --git a/tests/pending/run/toolbox_default_reporter_is_silent.scala b/tests/pending/run/toolbox_default_reporter_is_silent.scala index 4bd7a646b..691c54ed9 100644 --- a/tests/pending/run/toolbox_default_reporter_is_silent.scala +++ b/tests/pending/run/toolbox_default_reporter_is_silent.scala @@ -8,9 +8,9 @@ object Test extends App { toolbox.eval(reify{ object Utils { @deprecated("test", "2.10.0") - def foo { println("hello") } + def foo: Unit = { println("hello") } } Utils.foo }.tree) -}
\ No newline at end of file +} diff --git a/tests/pending/run/toolbox_parse_package.scala b/tests/pending/run/toolbox_parse_package.scala index 62412a50d..d566e760f 100644 --- a/tests/pending/run/toolbox_parse_package.scala +++ b/tests/pending/run/toolbox_parse_package.scala @@ -6,4 +6,4 @@ import scala.tools.reflect.ToolBox object Test extends App { val toolbox = cm.mkToolBox() println(toolbox.parse("package foo { object bar }")) -}
\ No newline at end of file +} diff --git a/tests/pending/run/toolbox_silent_reporter.scala b/tests/pending/run/toolbox_silent_reporter.scala index 03b1d6def..d3a471005 100644 --- a/tests/pending/run/toolbox_silent_reporter.scala +++ b/tests/pending/run/toolbox_silent_reporter.scala @@ -8,7 +8,7 @@ object Test extends App { toolbox.eval(reify{ object Utils { @deprecated("test", "2.10.0") - def foo { println("hello") } + def foo: Unit = { println("hello") } } Utils.foo @@ -16,4 +16,4 @@ object Test extends App { println("============compiler messages============") toolbox.frontEnd.infos.foreach(println(_)) println("=========================================") -}
\ No newline at end of file +} diff --git a/tests/pending/run/toolbox_typecheck_implicitsdisabled.scala b/tests/pending/run/toolbox_typecheck_implicitsdisabled.scala index 3fabdb33b..686592479 100644 --- a/tests/pending/run/toolbox_typecheck_implicitsdisabled.scala +++ b/tests/pending/run/toolbox_typecheck_implicitsdisabled.scala @@ -24,4 +24,4 @@ object Test extends App { case ex: Throwable => println(ex) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/toolbox_typecheck_inferimplicitvalue.scala b/tests/pending/run/toolbox_typecheck_inferimplicitvalue.scala index 3c5c994ac..9f2f73397 100644 --- a/tests/pending/run/toolbox_typecheck_inferimplicitvalue.scala +++ b/tests/pending/run/toolbox_typecheck_inferimplicitvalue.scala @@ -10,4 +10,4 @@ object C { object Test extends App { val tb = cm.mkToolBox() println(tb.inferImplicitValue(typeOf[C])) -}
\ No newline at end of file +} diff --git a/tests/pending/run/treePrint.scala b/tests/pending/run/treePrint.scala index 4a80e2824..8bbf645fa 100644 --- a/tests/pending/run/treePrint.scala +++ b/tests/pending/run/treePrint.scala @@ -27,9 +27,9 @@ object Test { } """ - class NullOutputStream extends OutputStream { def write(b: Int) { } } + class NullOutputStream extends OutputStream { def write(b: Int): Unit = { } } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val settings = new Settings settings.classpath.value = System.getProperty("java.class.path") settings.Ycompacttrees.value = true diff --git a/tests/pending/run/triemap-hash.scala b/tests/pending/run/triemap-hash.scala index f9913816d..902b80a01 100644 --- a/tests/pending/run/triemap-hash.scala +++ b/tests/pending/run/triemap-hash.scala @@ -7,12 +7,12 @@ import util.hashing.Hashing object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { hashing() equality() } - def hashing() { + def hashing(): Unit = { import collection._ val tm = new concurrent.TrieMap[String, String](Hashing.fromFunction(x => x.length + x(0).toInt), Equiv.universal) @@ -26,7 +26,7 @@ object Test { for (i <- 0 until 1000) assert(tm(i.toString) == i.toString) } - def equality() { + def equality(): Unit = { import collection._ val tm = new concurrent.TrieMap[String, String](Hashing.fromFunction(x => x(0).toInt), Equiv.fromFunction(_(0) == _(0))) diff --git a/tests/pending/run/try.scala b/tests/pending/run/try.scala index a4fdfd796..785f0153a 100644 --- a/tests/pending/run/try.scala +++ b/tests/pending/run/try.scala @@ -86,7 +86,7 @@ object Test extends AnyRef with App { } // ticket #981 - def try6 { + def try6: Unit = { class SekwencjaArray { def get = null } diff --git a/tests/pending/run/tuples.scala b/tests/pending/run/tuples.scala index a4ea9ddbc..4980f2fe6 100644 --- a/tests/pending/run/tuples.scala +++ b/tests/pending/run/tuples.scala @@ -8,7 +8,7 @@ object Test extends App { case (1, "abc", true) => Console.println("OK") case _ => ??? } - def func(x: Int, y: String, z: Double) { + def func(x: Int, y: String, z: Double): Unit = { Console.println("x = " + x + "; y = " + y + "; z = " + z); } diff --git a/tests/pending/run/typetags_core.scala b/tests/pending/run/typetags_core.scala index 5257d5511..877abb7bb 100644 --- a/tests/pending/run/typetags_core.scala +++ b/tests/pending/run/typetags_core.scala @@ -31,4 +31,4 @@ object Test extends App { println(implicitly[TypeTag[Null]]) println(implicitly[TypeTag[Nothing]] eq TypeTag.Nothing) println(implicitly[TypeTag[Nothing]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/typetags_multi.scala b/tests/pending/run/typetags_multi.scala index b30aac80a..e03bd3037 100644 --- a/tests/pending/run/typetags_multi.scala +++ b/tests/pending/run/typetags_multi.scala @@ -6,4 +6,4 @@ object Test extends App { println(implicitly[TypeTag[Array[Array[Int]]]]) println(implicitly[TypeTag[Array[Array[Array[Int]]]]]) println(implicitly[TypeTag[Array[Array[Array[Array[Int]]]]]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/typetags_serialize.scala b/tests/pending/run/typetags_serialize.scala index a7a784523..bfc739210 100644 --- a/tests/pending/run/typetags_serialize.scala +++ b/tests/pending/run/typetags_serialize.scala @@ -31,4 +31,4 @@ object Test extends App { test(implicitly[TypeTag[Int]]) test(implicitly[TypeTag[String]]) test(implicitly[TypeTag[C[Double]]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/unapply.scala b/tests/pending/run/unapply.scala index 0c5a70e76..43f02b9f3 100644 --- a/tests/pending/run/unapply.scala +++ b/tests/pending/run/unapply.scala @@ -1,5 +1,5 @@ object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { Foo.run() Mas.run() LisSeqArr.run() @@ -51,7 +51,7 @@ object Foo { def doMatch5(b:Bar) = (b:Any) match { case FaaPreciseSome(n:String) => n } - def run() { + def run(): Unit = { val b = new Bar assert(doMatch1(b) == (50,"medium")) assert(doMatch2(b) == null) @@ -77,7 +77,7 @@ object Mas { var size: Int = 60 var name: String = "too large" } - def run() { + def run(): Unit = { val b = new Baz assert((60,"too large") == (b match { case Gaz(s:Int, n:String) => (s,n) @@ -86,7 +86,7 @@ object Mas { } object LisSeqArr { - def run() { + def run(): Unit = { assert((1,2) == ((List(1,2,3): Any) match { case List(x,y,_*) => (x,y)})) assert((1,2) == ((List(1,2,3): Any) match { case Seq(x,y,_*) => (x,y)})) } @@ -98,7 +98,7 @@ object StreamFoo { case Stream.Empty => 0 case Stream.cons(hd, tl) => hd + sum(tl) } - def run() { + def run(): Unit = { val str: Stream[Int] = List(1,2,3).toStream assert(6 == sum(str)) } @@ -116,7 +116,7 @@ object Test1256 { } } - def run() { + def run(): Unit = { assert(!(new Buffer).jp.isDefinedAt(42)) } } diff --git a/tests/pending/run/unapplyArray.scala b/tests/pending/run/unapplyArray.scala index bf7c9e230..a29ef124b 100644 --- a/tests/pending/run/unapplyArray.scala +++ b/tests/pending/run/unapplyArray.scala @@ -24,7 +24,7 @@ object Test { Console.println("za aseq "+ Seq.unapplySeq(za)) */ val zl = zs match { - case Seq(xs@_*) => xs.length + case Seq(xs:_*) => xs.length } assert(zl == 4) } diff --git a/tests/pending/run/unittest_collection.scala b/tests/pending/run/unittest_collection.scala index 822e2b0c9..d10845475 100644 --- a/tests/pending/run/unittest_collection.scala +++ b/tests/pending/run/unittest_collection.scala @@ -2,7 +2,7 @@ object Test { import scala.collection.mutable.{ArrayBuffer, Buffer, BufferProxy, ListBuffer} - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { test(collection.mutable.ArrayBuffer[String]()) test(collection.mutable.ListBuffer[String]()) class BBuf(z:ListBuffer[String]) extends BufferProxy[String] { @@ -11,7 +11,7 @@ object Test { test(new BBuf(collection.mutable.ListBuffer[String]())) } - def test(x: Buffer[String]) { + def test(x: Buffer[String]): Unit = { // testing method += x += "one" assert(x(0) == "one", "retrieving 'one'") diff --git a/tests/pending/run/unittest_iterator.scala b/tests/pending/run/unittest_iterator.scala index 21dc64c3c..7c47e27e3 100644 --- a/tests/pending/run/unittest_iterator.scala +++ b/tests/pending/run/unittest_iterator.scala @@ -1,7 +1,7 @@ // Some iterator grouped/sliding unit tests object Test { def it = (1 to 10).iterator - def assertThat[T](expectedLength: Int, expectedLast: Seq[T])(it: Iterator[Seq[T]]) { + def assertThat[T](expectedLength: Int, expectedLast: Seq[T])(it: Iterator[Seq[T]]): Unit = { val xs = it.toList def fail(msg: String) = "assertion failed on %s: %s".format(xs, msg) assert(xs.size == expectedLength, fail("expected length " + expectedLength)) diff --git a/tests/pending/run/value-class-extractor-seq.scala b/tests/pending/run/value-class-extractor-seq.scala index f17a5314f..9264e7038 100644 --- a/tests/pending/run/value-class-extractor-seq.scala +++ b/tests/pending/run/value-class-extractor-seq.scala @@ -44,7 +44,7 @@ object Bip { object Test { def f(x: Any) = x match { case Bip(a, b, c) => s"Bip($a, $b, $c)" - case Bip(a, b, c @ _*) => s"Bip($a, $b, c @ ${stringOf(c)}: _*)" + case Bip(a, b, c : _*) => s"Bip($a, $b, c @ ${stringOf(c)}: _*)" case _ => "" + x.getClass } diff --git a/tests/pending/run/value-class-partial-func-depmet.scala b/tests/pending/run/value-class-partial-func-depmet.scala index 12ff64ed3..f8d2a16e7 100644 --- a/tests/pending/run/value-class-partial-func-depmet.scala +++ b/tests/pending/run/value-class-partial-func-depmet.scala @@ -2,7 +2,7 @@ class C class A { class C } object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val a = new A new VC("").foo(a) diff --git a/tests/pending/run/valueclasses-classtag-basic.scala b/tests/pending/run/valueclasses-classtag-basic.scala index 912a4bb01..cbad29609 100644 --- a/tests/pending/run/valueclasses-classtag-basic.scala +++ b/tests/pending/run/valueclasses-classtag-basic.scala @@ -2,4 +2,4 @@ class Foo(val x: Int) extends AnyVal object Test extends App { println(scala.reflect.classTag[Foo]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/valueclasses-classtag-existential.scala b/tests/pending/run/valueclasses-classtag-existential.scala index e0db9cdd7..03048710b 100644 --- a/tests/pending/run/valueclasses-classtag-existential.scala +++ b/tests/pending/run/valueclasses-classtag-existential.scala @@ -2,4 +2,4 @@ class Foo[T](val x: T) extends AnyVal object Test extends App { println(scala.reflect.classTag[Foo[_]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/valueclasses-classtag-generic.scala b/tests/pending/run/valueclasses-classtag-generic.scala index bd1f21383..34ac43729 100644 --- a/tests/pending/run/valueclasses-classtag-generic.scala +++ b/tests/pending/run/valueclasses-classtag-generic.scala @@ -2,4 +2,4 @@ class Foo[T](val x: T) extends AnyVal object Test extends App { println(scala.reflect.classTag[Foo[String]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/valueclasses-manifest-basic.scala b/tests/pending/run/valueclasses-manifest-basic.scala index eefab2016..663e6c89d 100644 --- a/tests/pending/run/valueclasses-manifest-basic.scala +++ b/tests/pending/run/valueclasses-manifest-basic.scala @@ -2,4 +2,4 @@ class Foo(val x: Int) extends AnyVal object Test extends App { println(manifest[Foo]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/valueclasses-manifest-existential.scala b/tests/pending/run/valueclasses-manifest-existential.scala index 47eb6d64d..491bee7ce 100644 --- a/tests/pending/run/valueclasses-manifest-existential.scala +++ b/tests/pending/run/valueclasses-manifest-existential.scala @@ -2,4 +2,4 @@ class Foo[T](val x: T) extends AnyVal object Test extends App { println(manifest[Foo[_]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/valueclasses-manifest-generic.scala b/tests/pending/run/valueclasses-manifest-generic.scala index 18313fba6..9d0bf4b59 100644 --- a/tests/pending/run/valueclasses-manifest-generic.scala +++ b/tests/pending/run/valueclasses-manifest-generic.scala @@ -2,4 +2,4 @@ class Foo[T](val x: T) extends AnyVal object Test extends App { println(manifest[Foo[String]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/valueclasses-pavlov.scala b/tests/pending/run/valueclasses-pavlov.scala index e73897f65..6ab5ff3e6 100644 --- a/tests/pending/run/valueclasses-pavlov.scala +++ b/tests/pending/run/valueclasses-pavlov.scala @@ -16,7 +16,7 @@ class C(x: String) { object Test { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val b1 = new Box1("") val b2 = new Box2("") val f: Foo = b2 diff --git a/tests/pending/run/valueclasses-typetag-basic.scala b/tests/pending/run/valueclasses-typetag-basic.scala index d0243f737..897767027 100644 --- a/tests/pending/run/valueclasses-typetag-basic.scala +++ b/tests/pending/run/valueclasses-typetag-basic.scala @@ -2,4 +2,4 @@ class Foo(val x: Int) extends AnyVal object Test extends App { println(scala.reflect.runtime.universe.typeOf[Foo]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/valueclasses-typetag-existential.scala b/tests/pending/run/valueclasses-typetag-existential.scala index 4cdaa44a8..ab935fb0d 100644 --- a/tests/pending/run/valueclasses-typetag-existential.scala +++ b/tests/pending/run/valueclasses-typetag-existential.scala @@ -2,4 +2,4 @@ class Foo[T](val x: T) extends AnyVal object Test extends App { println(scala.reflect.runtime.universe.typeOf[Foo[_]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/valueclasses-typetag-generic.scala b/tests/pending/run/valueclasses-typetag-generic.scala index eb32dfcad..dd5e996b8 100644 --- a/tests/pending/run/valueclasses-typetag-generic.scala +++ b/tests/pending/run/valueclasses-typetag-generic.scala @@ -2,4 +2,4 @@ class Foo[T](val x: T) extends AnyVal object Test extends App { println(scala.reflect.runtime.universe.typeOf[Foo[String]]) -}
\ No newline at end of file +} diff --git a/tests/pending/run/virtpatmat_apply.scala b/tests/pending/run/virtpatmat_apply.scala index b8776f4af..57259d0b3 100644 --- a/tests/pending/run/virtpatmat_apply.scala +++ b/tests/pending/run/virtpatmat_apply.scala @@ -4,4 +4,4 @@ object Test extends App { case x :: y :: xs if xs.length == 2 => println("FAIL") case x :: y :: xs if xs.length == 1 => println("OK "+ y) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/virtpatmat_literal.scala b/tests/pending/run/virtpatmat_literal.scala index 9a68d296b..e94f7d627 100644 --- a/tests/pending/run/virtpatmat_literal.scala +++ b/tests/pending/run/virtpatmat_literal.scala @@ -19,4 +19,4 @@ object Test extends App { case 1 => println("FAILED") } -}
\ No newline at end of file +} diff --git a/tests/pending/run/virtpatmat_npe.scala b/tests/pending/run/virtpatmat_npe.scala index 84a927645..efa66f328 100644 --- a/tests/pending/run/virtpatmat_npe.scala +++ b/tests/pending/run/virtpatmat_npe.scala @@ -7,4 +7,4 @@ class C { } } -object Test extends C with App
\ No newline at end of file +object Test extends C with App diff --git a/tests/pending/run/virtpatmat_partial.scala b/tests/pending/run/virtpatmat_partial.scala index a23531461..92e262a29 100644 --- a/tests/pending/run/virtpatmat_partial.scala +++ b/tests/pending/run/virtpatmat_partial.scala @@ -17,7 +17,7 @@ object Test extends App { final val GTGTGTEQ: Char = 'f' final val ASSIGN : Char = 'g' - def acceptClosingAngle(in: Char) { + def acceptClosingAngle(in: Char): Unit = { val closers: PartialFunction[Char, Char] = { case GTGTGTEQ => GTGTEQ case GTGTGT => GTGT @@ -44,7 +44,7 @@ object Test extends App { final val GTGTGTEQ: Char = 'f' final val ASSIGN : Char = 'g' - def acceptClosingAngle(in: Char) { + def acceptClosingAngle(in: Char): Unit = { val closers: PartialFunction[Char, Char] = x => x match { case GTGTGTEQ => GTGTEQ case GTGTGT => GTGT @@ -71,7 +71,7 @@ object Test extends App { final val GTGTGTEQ= 'f' final val ASSIGN = 'g' - def acceptClosingAngle(in: Char) { + def acceptClosingAngle(in: Char): Unit = { val closers: PartialFunction[Char, Char] = x => x match { case GTGTGTEQ => GTGTEQ case GTGTGT => GTGT @@ -98,7 +98,7 @@ object Test extends App { final val GTGTGTEQ= 'f' final val ASSIGN = 'g' - def acceptClosingAngle(in: Char) { + def acceptClosingAngle(in: Char): Unit = { val closers: PartialFunction[Char, Char] = { case GTGTGTEQ => GTGTEQ case GTGTGT => GTGT @@ -125,7 +125,7 @@ object Test extends App { final val GTGTGTEQ = 6 final val ASSIGN = 7 - def acceptClosingAngle(in: Int) { + def acceptClosingAngle(in: Int): Unit = { val closers: PartialFunction[Int, Int] = x => {println("hai!"); (x + 1)} match { case GTGTGTEQ => GTGTEQ case GTGTGT => GTGT @@ -152,7 +152,7 @@ object Test extends App { final val GTGTGTEQ = 6 final val ASSIGN = 7 - def acceptClosingAngle(in: Int) { + def acceptClosingAngle(in: Int): Unit = { val closers: PartialFunction[Int, Int] = { case GTGTGTEQ => GTGTEQ case GTGTGT => GTGT diff --git a/tests/pending/run/virtpatmat_partial_backquoted.scala b/tests/pending/run/virtpatmat_partial_backquoted.scala index 6d92229d6..ed89a605f 100644 --- a/tests/pending/run/virtpatmat_partial_backquoted.scala +++ b/tests/pending/run/virtpatmat_partial_backquoted.scala @@ -9,4 +9,4 @@ object Test extends App { val stp = new SymbolType val stp2 = new SymbolType println(findRegionsWithSymbolType(List(SymbolInfo(stp2, List(), null), SymbolInfo(stp, List(new Region), null)), stp)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/virtpatmat_tailcalls_verifyerror.scala b/tests/pending/run/virtpatmat_tailcalls_verifyerror.scala index 5ce91e8dc..6d33883df 100644 --- a/tests/pending/run/virtpatmat_tailcalls_verifyerror.scala +++ b/tests/pending/run/virtpatmat_tailcalls_verifyerror.scala @@ -11,4 +11,4 @@ object Test extends App { } } println(test(true)) -}
\ No newline at end of file +} diff --git a/tests/pending/run/virtpatmat_try.scala b/tests/pending/run/virtpatmat_try.scala index dab2c8922..f417488c6 100644 --- a/tests/pending/run/virtpatmat_try.scala +++ b/tests/pending/run/virtpatmat_try.scala @@ -20,7 +20,7 @@ object Test extends App { case _: Throwable => println("other") } - def simpleTry { + def simpleTry: Unit = { try { bla } catch { @@ -29,19 +29,19 @@ object Test extends App { } } - def typedWildcardTry { + def typedWildcardTry: Unit = { try { bla } catch { case _: ClassCastException => bla } } - def wildcardTry { + def wildcardTry: Unit = { try { bla } catch { case _: Throwable => bla } } - def tryPlusFinally { + def tryPlusFinally: Unit = { try { bla } finally { println("finally") } } - def catchAndPassToLambda { + def catchAndPassToLambda: Unit = { try { bla } catch { case ex: Exception => val f = () => ex } } } diff --git a/tests/pending/run/virtpatmat_typed.scala b/tests/pending/run/virtpatmat_typed.scala index cdd6d3c74..3693a8131 100644 --- a/tests/pending/run/virtpatmat_typed.scala +++ b/tests/pending/run/virtpatmat_typed.scala @@ -4,4 +4,4 @@ object Test extends App { case x: String => println("OK "+ x) case x: String => println("FAILED") } -}
\ No newline at end of file +} diff --git a/tests/pending/run/virtpatmat_typetag.scala b/tests/pending/run/virtpatmat_typetag.scala index c1b1fd813..02ec928ed 100644 --- a/tests/pending/run/virtpatmat_typetag.scala +++ b/tests/pending/run/virtpatmat_typetag.scala @@ -33,4 +33,4 @@ object Test extends App { extractorMatch[String](1) extractorMatch[Any](true) extractorMatch[String]("woele") -}
\ No newline at end of file +} diff --git a/tests/pending/run/virtpatmat_unapply.scala b/tests/pending/run/virtpatmat_unapply.scala index a6e71f396..76e44938b 100644 --- a/tests/pending/run/virtpatmat_unapply.scala +++ b/tests/pending/run/virtpatmat_unapply.scala @@ -29,4 +29,4 @@ object Test extends App { Predef.this.implicitly[scala.Predef.MatchingStrategy[Option]](scala.this.Predef.OptionMatching).success[Int](x7._1)))).orElse[Int]( Predef.this.implicitly[scala.Predef.MatchingStrategy[Option]](scala.this.Predef.OptionMatching).fail) ).apply(IntList.apply(1, null)) -*/
\ No newline at end of file +*/ diff --git a/tests/pending/run/virtpatmat_unapplyprod.scala b/tests/pending/run/virtpatmat_unapplyprod.scala index 441e5e396..cd7f8a3dc 100644 --- a/tests/pending/run/virtpatmat_unapplyprod.scala +++ b/tests/pending/run/virtpatmat_unapplyprod.scala @@ -18,6 +18,6 @@ object Test extends App { FooSeq(1, "a", true, false, true) match { case FooSeq(1, "a") => println("nope") - case FooSeq(1, "a", x@_* ) => println(x.toList) + case FooSeq(1, "a", x:_* ) => println(x.toList) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/virtpatmat_unapplyseq.scala b/tests/pending/run/virtpatmat_unapplyseq.scala index 270fa9045..1ebbce393 100644 --- a/tests/pending/run/virtpatmat_unapplyseq.scala +++ b/tests/pending/run/virtpatmat_unapplyseq.scala @@ -2,4 +2,4 @@ object Test extends App { List(1,2,3) match { case Seq(x, y, z) => println(x * y * z) } -}
\ No newline at end of file +} diff --git a/tests/pending/run/virtpatmat_valdef.scala b/tests/pending/run/virtpatmat_valdef.scala index f1a9b46cd..77c6adacd 100644 --- a/tests/pending/run/virtpatmat_valdef.scala +++ b/tests/pending/run/virtpatmat_valdef.scala @@ -3,4 +3,4 @@ object Test extends App { // TODO: irrefutability should indicate we don't actually need to test, just deconstruct val (modified, result) : (Boolean, String) = (true, null) println("meh"+ (modified, result)) -}
\ No newline at end of file +} |