diff options
35 files changed, 86 insertions, 86 deletions
diff --git a/tests/disabled/not-representable/pos/annotated-treecopy/Impls_Macros_1.scala b/tests/disabled/not-representable/pos/annotated-treecopy/Impls_Macros_1.scala index 986287dfa..00ddb5314 100644 --- a/tests/disabled/not-representable/pos/annotated-treecopy/Impls_Macros_1.scala +++ b/tests/disabled/not-representable/pos/annotated-treecopy/Impls_Macros_1.scala @@ -39,7 +39,7 @@ object Macros { val reifiedExpr = c.Expr[scala.reflect.runtime.universe.Expr[T => U]](reifiedTree) val template = c.universe.reify(new (T => U) with TypedFunction { - override def toString = c.Expr[String](q"""${tp+" => "+ttag.tpe+" { "+b1.toString+" } "}""").splice // DEBUG + override def toString = c.Expr[String](q"""${tp +" => " + ttag.tpe +" { "+ b1.toString +" } "}""").splice // DEBUG def tree = reifiedExpr.splice.tree val typeIn = c.Expr[String](q"${tp.toString}").splice val typeOut = c.Expr[String](q"${ttag.tpe.toString}").splice diff --git a/tests/neg/assignments.scala b/tests/neg/assignments.scala index 951f9eca5..2314783fe 100644 --- a/tests/neg/assignments.scala +++ b/tests/neg/assignments.scala @@ -3,7 +3,7 @@ object assignments { var a = Array(1, 2, 3) var i = 0 a(i) = a(i) * 2 - a(i+1) += 1 + a(i + 1) += 1 class C { var myX = 0 diff --git a/tests/neg/typedIdents.scala b/tests/neg/typedIdents.scala index 1bac62bd6..cb7cca743 100644 --- a/tests/neg/typedIdents.scala +++ b/tests/neg/typedIdents.scala @@ -18,13 +18,13 @@ package P { // `X' bound by package clause println("L12: " + x) // `x' refers to constant `3' here locally { import Q.X._ // `x' and `y' bound by wildcard import - println("L14: "+x) // reference to `x' is ambiguous here + println("L14: " + x) // reference to `x' is ambiguous here import X.y // `y' bound by explicit import println("L16: " + y) // `y' refers to `Q.X.y' here locally { import P.X._ // `x' and `y' bound by wildcard import val x = "abc" // `x' bound by local definition - println("L19: "+y) // reference to `y' is ambiguous here + println("L19: " + y) // reference to `y' is ambiguous here println("L20: " + x) // `x' refers to string ``abc'' here } } diff --git a/tests/pending/pos/depmet_implicit_oopsla_session.scala b/tests/pending/pos/depmet_implicit_oopsla_session.scala index aa8478056..a9c8e56ce 100644 --- a/tests/pending/pos/depmet_implicit_oopsla_session.scala +++ b/tests/pending/pos/depmet_implicit_oopsla_session.scala @@ -34,7 +34,7 @@ object Sessions { def addServer = In{x: Int => In{y: Int => System.out.println("Thinking") - Out(x+y, + Out(x + y, Stop())}} def addClient = diff --git a/tests/pending/pos/depmet_implicit_oopsla_session_2.scala b/tests/pending/pos/depmet_implicit_oopsla_session_2.scala index 4951c10a1..29a76d5cf 100644 --- a/tests/pending/pos/depmet_implicit_oopsla_session_2.scala +++ b/tests/pending/pos/depmet_implicit_oopsla_session_2.scala @@ -54,7 +54,7 @@ object Sessions { def addServer = In{x: Int => In{y: Int => System.out.println("Thinking") - Out(x+y, + Out(x + y, Stop())}} def addClient = diff --git a/tests/pending/pos/depmet_implicit_oopsla_session_simpler.scala b/tests/pending/pos/depmet_implicit_oopsla_session_simpler.scala index 04b8f94e6..fad5eba40 100644 --- a/tests/pending/pos/depmet_implicit_oopsla_session_simpler.scala +++ b/tests/pending/pos/depmet_implicit_oopsla_session_simpler.scala @@ -31,7 +31,7 @@ object Sessions { def addServer = In{x: Int => In{y: Int => System.out.println("Thinking") - Out(x+y, + Out(x + y, Stop())}} def addClient = diff --git a/tests/pending/pos/existentials-harmful.scala b/tests/pending/pos/existentials-harmful.scala index 8722852e8..91dbd4dfd 100644 --- a/tests/pending/pos/existentials-harmful.scala +++ b/tests/pending/pos/existentials-harmful.scala @@ -17,7 +17,7 @@ object ExistentialsConsideredHarmful { // 1. def carry[A <: Animal](box: TransportBox[A]): Unit = { - println(box.animal.name+" got carried away") + println(box.animal.name +" got carried away") } val aBox = @@ -37,7 +37,7 @@ object ExistentialsConsideredHarmful { abstract class BoxCarrier[R <: Animal](box: TransportBox[R]) { def speed: Int - def talkToAnimal: Unit = println("The carrier says hello to"+box.animal.name) + def talkToAnimal: Unit = println("The carrier says hello to" + box.animal.name) } // 3. diff --git a/tests/pending/pos/t1756.scala b/tests/pending/pos/t1756.scala index 1d067c3b0..58f56ccb9 100644 --- a/tests/pending/pos/t1756.scala +++ b/tests/pending/pos/t1756.scala @@ -30,7 +30,7 @@ class A extends Ring[A] { } class Poly[C <: Ring[C]](val c: C) extends Ring[Poly[C]] { - def +(that: Poly[C]) = new Poly(this.c+that.c) + def +(that: Poly[C]) = new Poly(this.c + that.c) def *(that: Poly[C]) = new Poly(this.c*that.c) } @@ -41,14 +41,14 @@ object Test extends App { val a = new A val x = new Poly(new A) - println(x+a) // works - println(a+x) // works + println(x + a) // works + println(a + x) // works val y = new Poly(new Poly(new A)) - println(x+y*x) // works - println(x*y+x) // works - println(y*x+x) // works + println(x + y*x) // works + println(x*y + x) // works + println(y*x + x) // works - println(x+x*y) // failed before + println(x + x*y) // failed before } diff --git a/tests/pending/pos/t796.scala b/tests/pending/pos/t796.scala index 066625179..b1463ed92 100644 --- a/tests/pending/pos/t796.scala +++ b/tests/pending/pos/t796.scala @@ -16,7 +16,7 @@ object Test extends App { } def test(x: Int) = x match { - case Twice(y) => "x is two times "+y + case Twice(y) => "x is two times " + y case _ => "x is odd" } diff --git a/tests/pending/pos/unapplySeq.scala b/tests/pending/pos/unapplySeq.scala index 6d13cc8b5..e642fd8d6 100644 --- a/tests/pending/pos/unapplySeq.scala +++ b/tests/pending/pos/unapplySeq.scala @@ -9,12 +9,12 @@ object FooSeq { def main(args:Array[String]) = { val b = new Bar b match { - case FooSeq(s:Int,_,n:String) => Console.println("size "+s+" name "+n) + case FooSeq(s:Int,_,n:String) => Console.println("size " + s +" name "+ n) } b.size = 54 b.name = List("large","L") b match { - case FooSeq(s:Int,_,n:String) => Console.println("size "+s+" name "+n) + case FooSeq(s:Int,_,n:String) => Console.println("size " + s +" name "+ n) } } } diff --git a/tests/pickling/Labels.scala b/tests/pickling/Labels.scala index 4373723a8..3dc7304d6 100644 --- a/tests/pickling/Labels.scala +++ b/tests/pickling/Labels.scala @@ -4,8 +4,8 @@ object Labels { while(i>0) { var j = 0 while(j<i) { - println(j+" " + i) - j = j +1 + println(j +" " + i) + j = j + 1 } i = i - 1} pattern(1) diff --git a/tests/pos/Labels.scala b/tests/pos/Labels.scala index a2271461d..f1a120920 100644 --- a/tests/pos/Labels.scala +++ b/tests/pos/Labels.scala @@ -8,8 +8,8 @@ object Labels { while(i>0) { var j = 0 while(j<i) { - println(j+" " + i) - j = j +1 + println(j +" " + i) + j = j + 1 } i = i - 1} pattern(1) diff --git a/tests/pos/List1.scala b/tests/pos/List1.scala index 30ebf5e1e..733ef376d 100644 --- a/tests/pos/List1.scala +++ b/tests/pos/List1.scala @@ -21,7 +21,7 @@ object lists { def foo = { val intnil = Nil[Int]; - val intlist = intnil.prepend(1).prepend(1+1); + val intlist = intnil.prepend(1).prepend(1 + 1); val x: Int = intlist.head; val strnil = Nil[String]; val strlist = strnil.prepend("A").prepend("AA"); @@ -33,8 +33,8 @@ object lists { def isEmpty: Boolean = false; def head: Int = 1; def foo: List[Int] { def isEmpty: Boolean; def head: Int; def tail: List[Int] } = Nil[Int]; - def tail0: List[Int] = foo.prepend(1).prepend(1+1); - def tail: List[Int] = Nil[Int].prepend(1).prepend(1+1); + def tail0: List[Int] = foo.prepend(1).prepend(1 + 1); + def tail: List[Int] = Nil[Int].prepend(1).prepend(1 + 1); } def foo2 = { diff --git a/tests/pos/Meter.scala b/tests/pos/Meter.scala index 53be6f9d0..bbee710c4 100644 --- a/tests/pos/Meter.scala +++ b/tests/pos/Meter.scala @@ -12,7 +12,7 @@ package a { def < (other: Meter): Boolean = this.underlying < other.underlying def toFoot: Foot = new Foot(this.underlying * 0.3048) override def print = { Console.print(">>>"); super.print; proprint } - override def toString: String = underlying.toString+"m" + override def toString: String = underlying.toString +"m" } object Meter extends (Double => Meter) { @@ -30,7 +30,7 @@ package a { class Foot(val unbox: Double) extends AnyVal { def + (other: Foot): Foot = new Foot(this.unbox + other.unbox) - override def toString = unbox.toString+"ft" + override def toString = unbox.toString +"ft" } object Foot { implicit val boxings: BoxingConversions[Foot, Double] = new BoxingConversions[Foot, Double] { @@ -65,23 +65,23 @@ object Test extends App { //println((x + x) / x) println((x + x) / 0.5) println((x < x).toString) - println("x.isInstanceOf[Meter]: "+x.isInstanceOf[Meter]) + println("x.isInstanceOf[Meter]: " + x.isInstanceOf[Meter]) - println("x.hashCode: "+x.hashCode) - println("x == 1: "+(x == 1)) - println("x == y: "+(x == y)) + println("x.hashCode: " + x.hashCode) + println("x == 1: " +(x == 1)) + println("x == y: " +(x == y)) assert(x.hashCode == (1.0).hashCode) val a: Any = x val b: Any = y - println("a == b: "+(a == b)) + println("a == b: " +(a == b)) { println("testing native arrays") val arr = Array(x, y + x) println(arr.deep) def foo[T <: Printable](x: Array[T]) = { - for (i <- 0 until x.length) { x(i).print; println(" "+x(i)) } + for (i <- 0 until x.length) { x(i).print; println(" " + x(i)) } } val m = arr(0) println(m) @@ -93,7 +93,7 @@ object Test extends App { // val arr = FlatArray(x, y + x) // println(arr) // def foo(x: FlatArray[Meter]) { - // for (i <- 0 until x.length) { x(i).print; println(" "+x(i)) } + // for (i <- 0 until x.length) { x(i).print; println(" " + x(i)) } // } // val m = arr(0) // println(m) diff --git a/tests/pos/assignments.scala b/tests/pos/assignments.scala index 93abbde20..9801bdca2 100644 --- a/tests/pos/assignments.scala +++ b/tests/pos/assignments.scala @@ -3,7 +3,7 @@ object assignments { var a = Array(1, 2, 3) var i = 0 a(i) = a(i) * 2 - a(i+1) += 1 + a(i + 1) += 1 class C { var myX = 0 diff --git a/tests/pos/t1133.scala b/tests/pos/t1133.scala index 562b528ea..2e4793e99 100644 --- a/tests/pos/t1133.scala +++ b/tests/pos/t1133.scala @@ -11,14 +11,14 @@ object Match object Extractor1 { def unapply(x: Any) = x match { - case x: String => Some(x, x+x, x+x+x, x+x, x) + case x: String => Some(x, x + x, x + x+x, x+x, x) case _ => None } } object Extractor2 { def unapply(x: Any) = x match { - case x: String => Some(x, x+x, x+x+x) + case x: String => Some(x, x + x, x + x+x) case _ => None } } diff --git a/tests/pos/t1168.scala b/tests/pos/t1168.scala index 75638e792..f43436812 100644 --- a/tests/pos/t1168.scala +++ b/tests/pos/t1168.scala @@ -6,7 +6,7 @@ object Test extends App { throw new Exception } catch { case e : SpecialException => { - println("matched SpecialException: "+e) + println("matched SpecialException: " + e) assume(e.isInstanceOf[SpecialException]) } case e : Exception => { diff --git a/tests/pos/typedIdents.scala b/tests/pos/typedIdents.scala index 650766ec0..e99b5a045 100644 --- a/tests/pos/typedIdents.scala +++ b/tests/pos/typedIdents.scala @@ -18,13 +18,13 @@ package P { // `X' bound by package clause println("L12: " + x) // `x' refers to constant `3' here locally { import Q.X._ // `x' and `y' bound by wildcard import - // println("L14: "+x) // reference to `x' is ambiguous here + // println("L14: " + x) // reference to `x' is ambiguous here import X.y // `y' bound by explicit import println("L16: " + y) // `y' refers to `Q.X.y' here locally { val x = "abc" // `x' bound by local definition import P.X._ // `x' and `y' bound by wildcard import - // println("L19: "+y) // reference to `y' is ambiguous here + // println("L19: " + y) // reference to `y' is ambiguous here println("L20: " + x) // `x' refers to string ``abc'' here } } diff --git a/tests/untried/neg-with-implicits/implicits.scala b/tests/untried/neg-with-implicits/implicits.scala index 22633a1f3..5cb09804c 100644 --- a/tests/untried/neg-with-implicits/implicits.scala +++ b/tests/untried/neg-with-implicits/implicits.scala @@ -18,7 +18,7 @@ object Test { import Sub._ val p = new Pos def f(x: Int): Int = x - f(p+1) + f(p + 1) } object test2 { diff --git a/tests/untried/neg/for-comprehension-old.scala b/tests/untried/neg/for-comprehension-old.scala index 10ae363bd..270861751 100644 --- a/tests/untried/neg/for-comprehension-old.scala +++ b/tests/untried/neg/for-comprehension-old.scala @@ -1,11 +1,11 @@ class A { - for (x <- 1 to 5 ; y = x) yield x+y // ok - for (x <- 1 to 5 ; val y = x) yield x+y // fail - for (val x <- 1 to 5 ; y = x) yield x+y // fail - for (val x <- 1 to 5 ; val y = x) yield x+y // fail + for (x <- 1 to 5 ; y = x) yield x + y // ok + for (x <- 1 to 5 ; val y = x) yield x + y // fail + for (val x <- 1 to 5 ; y = x) yield x + y // fail + for (val x <- 1 to 5 ; val y = x) yield x + y // fail - for (z <- 1 to 2 ; x <- 1 to 5 ; y = x) yield x+y // ok - for (z <- 1 to 2 ; x <- 1 to 5 ; val y = x) yield x+y // fail - for (z <- 1 to 2 ; val x <- 1 to 5 ; y = x) yield x+y // fail - for (z <- 1 to 2 ; val x <- 1 to 5 ; val y = x) yield x+y // fail + for (z <- 1 to 2 ; x <- 1 to 5 ; y = x) yield x + y // ok + for (z <- 1 to 2 ; x <- 1 to 5 ; val y = x) yield x + y // fail + for (z <- 1 to 2 ; val x <- 1 to 5 ; y = x) yield x + y // fail + for (z <- 1 to 2 ; val x <- 1 to 5 ; val y = x) yield x + y // fail } diff --git a/tests/untried/neg/names-defaults-neg.scala b/tests/untried/neg/names-defaults-neg.scala index 2f8700ac6..589259622 100644 --- a/tests/untried/neg/names-defaults-neg.scala +++ b/tests/untried/neg/names-defaults-neg.scala @@ -98,7 +98,7 @@ object Test extends App { f3818(y = 1, m = 1) // DEFINITIONS - def test1(a: Int, b: String) = a +": "+ b + def test1(a: Int, b: String) = a +": " + b def test2(x: Unit) = println("test2") def test3(a: Int, b: Int) = a + b def test7(m: Int) = m diff --git a/tests/untried/neg/specification-scopes/P_2.scala b/tests/untried/neg/specification-scopes/P_2.scala index d59f82e90..03a52bdcd 100644 --- a/tests/untried/neg/specification-scopes/P_2.scala +++ b/tests/untried/neg/specification-scopes/P_2.scala @@ -1,21 +1,21 @@ package P { // 'X' bound by package clause import Console._ // 'println' bound by wildcard import object A { - println("L4: "+X) // 'X' refers to 'P.X' here + println("L4: " + X) // 'X' refers to 'P.X' here object B { import Q._ // 'X' bound by wildcard import - println("L7: "+X) // 'X' refers to 'Q.X' here + println("L7: " + X) // 'X' refers to 'Q.X' here import X._ // 'x' and 'y' bound by wildcard import - println("L8: "+x) // 'x' refers to 'Q.X.x' here + println("L8: " + x) // 'x' refers to 'Q.X.x' here object C { val x = 3 // 'x' bound by local definition - println("L12: "+x); // 'x' refers to constant '3' here + println("L12: " + x); // 'x' refers to constant '3' here { import Q.X._ // 'x' and 'y' bound by wildcard - println("L14: "+x) // reference to 'x' is ambiguous here + println("L14: " + x) // reference to 'x' is ambiguous here import X.y // 'y' bound by explicit import - println("L16: "+y); // 'y' refers to 'Q.X.y' here + println("L16: " + y); // 'y' refers to 'Q.X.y' here { val x = "abc" // 'x' bound by local definition import P.X._ // 'x' and 'y' bound by wildcard - println("L19: "+y) // reference to 'y' is ambiguous here - println("L20: "+x) // 'x' refers to string ''abc'' here + println("L19: " + y) // reference to 'y' is ambiguous here + println("L20: " + x) // 'x' refers to string ''abc'' here }}}}}} diff --git a/tests/untried/neg/switch.scala b/tests/untried/neg/switch.scala index a66ed768f..b4d3392f9 100644 --- a/tests/untried/neg/switch.scala +++ b/tests/untried/neg/switch.scala @@ -55,7 +55,7 @@ object Main { } // some ints just to mix it up a bit - def succ4(x: Int, y: Int) = ((x+y): @switch) match { + def succ4(x: Int, y: Int) = ((x + y): @switch) match { case 1 => 5 case 2 => 10 case 3 => 20 diff --git a/tests/untried/neg/t5702-neg-bad-xbrace.scala b/tests/untried/neg/t5702-neg-bad-xbrace.scala index 64bbdb18b..89f5b5d62 100644 --- a/tests/untried/neg/t5702-neg-bad-xbrace.scala +++ b/tests/untried/neg/t5702-neg-bad-xbrace.scala @@ -26,6 +26,6 @@ object Test { val xml = <top><a>apple</a><b>boy</b><c>child</c></top> // bad brace or paren after _* val <top>{a, z@_*)}</top> = xml - println("A for "+ a +", ending with "+ z) + println("A for " + a +", ending with "+ z) } } diff --git a/tests/untried/neg/t5702-neg-ugly-xbrace.scala b/tests/untried/neg/t5702-neg-ugly-xbrace.scala index 0ff7bfa09..bb587e812 100644 --- a/tests/untried/neg/t5702-neg-ugly-xbrace.scala +++ b/tests/untried/neg/t5702-neg-ugly-xbrace.scala @@ -9,6 +9,6 @@ object Test { // Assuming } for ) after _* would not be not outlandish. // bad brace or paren after _* val <top>{a, z@_*)</top> = xml - println("A for "+ a +", ending with "+ z) + println("A for " + a +", ending with "+ z) } } diff --git a/tests/untried/neg/t856.scala b/tests/untried/neg/t856.scala index fea216bfa..a239ac9eb 100644 --- a/tests/untried/neg/t856.scala +++ b/tests/untried/neg/t856.scala @@ -1,7 +1,7 @@ trait Complex extends Product2[Double,Double] class ComplexRect(val _1:Double, _2:Double) extends Complex { - override def toString = "ComplexRect("+_1+","+_2+")" + override def toString = "ComplexRect(" +_1 +","+_2 +")" } object Test { diff --git a/tests/untried/neg/warn-unused-privates.scala b/tests/untried/neg/warn-unused-privates.scala index cb6e946a3..64e7679f3 100644 --- a/tests/untried/neg/warn-unused-privates.scala +++ b/tests/untried/neg/warn-unused-privates.scala @@ -1,7 +1,7 @@ class Bippy(a: Int, b: Int) { private def this(c: Int) = this(c, c) // warn private def bippy(x: Int): Int = bippy(x) // TODO: could warn - private def boop(x: Int) = x+a+b // warn + private def boop(x: Int) = x + a + b // warn final private val MILLIS1 = 2000 // no warn, might have been inlined final private val MILLIS2: Int = 1000 // warn final private val HI_COMPANION: Int = 500 // no warn, accessed from companion diff --git a/tests/untried/pos/FPTest.scala b/tests/untried/pos/FPTest.scala index b351b7bb9..6fab0fe67 100644 --- a/tests/untried/pos/FPTest.scala +++ b/tests/untried/pos/FPTest.scala @@ -4,7 +4,7 @@ import annotation.strictfp @strictfp class FPTest { def main(args: Array[String]): Unit = { - val d: Double = 8e+307 + val d: Double = 8e + 307 println(4.0 * d * 0.5); println(2.0 * d); } diff --git a/tests/untried/pos/iterator-traversable-mix.scala b/tests/untried/pos/iterator-traversable-mix.scala index 2d6bf44c7..acc9c13ad 100644 --- a/tests/untried/pos/iterator-traversable-mix.scala +++ b/tests/untried/pos/iterator-traversable-mix.scala @@ -4,5 +4,5 @@ object Test { x2 <- Iterator(3, 4) x3 <- Seq(5, 6).iterator x4 <- Stream(7, 8) - } yield x1+x2+x3+x4 + } yield x1 + x2 + x3 + x4 } diff --git a/tests/untried/pos/nested.scala b/tests/untried/pos/nested.scala index b038fce39..f73790ae0 100644 --- a/tests/untried/pos/nested.scala +++ b/tests/untried/pos/nested.scala @@ -4,9 +4,9 @@ class A(pa : Int) { def a1 = pa; class B(pb : Int) { - def b1 = pa+pb+a1; + def b1 = pa + pb + a1; class C(pc : Int) extends A(b1) { - def c1 = pc+pb+pa + def c1 = pc + pb + pa } val c1 = new C(66) } @@ -22,7 +22,7 @@ class A1(x0 : Int) extends A(x0) with M { class D() extends B(42) { val c2 = new C(66); class E() extends C(5) { - def e1 = c1+b1+a1; + def e1 = c1 + b1 + a1; def e2 = new D(); } } diff --git a/tests/untried/pos/sudoku.scala b/tests/untried/pos/sudoku.scala index 9435f504d..44c59b978 100644 --- a/tests/untried/pos/sudoku.scala +++ b/tests/untried/pos/sudoku.scala @@ -12,12 +12,12 @@ object SudokuSolver extends App { // coordinate def invalid(i: Int, x: Int, y: Int, n: Char): Boolean = i<9 && (m(y)(i) == n || m(i)(x) == n || - m(y/3*3 + i/3)(x/3*3 + i % 3) == n || invalid(i+1, x, y, n)) + m(y/3*3 + i/3)(x/3*3 + i % 3) == n || invalid(i + 1, x, y, n)) // Looping over a half-closed range of consecutive integers [l..u) // is factored out into a higher-order function def fold(f: (Int, Int) => Int, accu: Int, l: Int, u: Int): Int = - if(l==u) accu else fold(f, f(accu, l), l+1, u) + if(l==u) accu else fold(f, f(accu, l), l + 1, u) // The search function examines each position on the board in turn, // trying the numbers 1..9 in each unfilled position @@ -25,17 +25,17 @@ object SudokuSolver extends App { // accu by applying the given function f to it whenever a solution m // is found def search(x:Int, y:Int, f: (Int) => Int, accu: Int): Int = (x, y) match { - case (9, y) => search(0, y+1, f, accu) // next row + case (9, y) => search(0, y + 1, f, accu) // next row case (0, 9) => f(accu) // found a solution - case (x, y) => if (m(y)(x) != '0') search(x+1, y, f, accu) else + case (x, y) => if (m(y)(x) != '0') search(x + 1, y, f, accu) else fold((accu: Int, n: Int) => if (invalid(0, x, y, (n + 48).toChar)) accu else { m(y)(x) = (n + 48).toChar; - val newaccu = search(x+1, y, f, accu); + val newaccu = search(x + 1, y, f, accu); m(y)(x) = '0'; newaccu}, accu, 1, 10)} // The main part of the program uses the search function to accumulate // the total number of solutions - println("\n"+search(0,0,i => {print; i+1},0)+" solution(s)") + println("\n" + search(0,0,i => {print; i + 1},0)+" solution(s)") } diff --git a/tests/untried/pos/t3136.scala b/tests/untried/pos/t3136.scala index 33d42c2f3..239bd8f54 100644 --- a/tests/untried/pos/t3136.scala +++ b/tests/untried/pos/t3136.scala @@ -13,7 +13,7 @@ object NullaryMethodType { object Test { def TEST(tp: Type): String = tp match { - case PolyType(ps1, PolyType(ps2, res @ PolyType(a, b))) => "1"+tp // couldn't find a simpler version that still crashes - case NullaryMethodType(meh) => "2"+meh + case PolyType(ps1, PolyType(ps2, res @ PolyType(a, b))) => "1" + tp // couldn't find a simpler version that still crashes + case NullaryMethodType(meh) => "2" + meh } } diff --git a/tests/untried/pos/t592.scala b/tests/untried/pos/t592.scala index 6a941ef51..bad1c8528 100644 --- a/tests/untried/pos/t592.scala +++ b/tests/untried/pos/t592.scala @@ -19,7 +19,7 @@ abstract class DirectedGraph extends Graph { class EdgeImpl(origin: Node, dest: Node) { def from = origin; def to = dest; - override def toString = ""+origin+" --> "+dest + override def toString = "" + origin +" --> "+ dest } class NodeImpl extends NodeIntf { self: Node => @@ -30,7 +30,7 @@ abstract class DirectedGraph extends Graph { edges = edge :: edges; edge; } - override def toString = "Node "+id + override def toString = "Node " + id } protected def newNode: Node; diff --git a/tests/untried/pos/t789.scala b/tests/untried/pos/t789.scala index 7a17f10b0..c453e229a 100644 --- a/tests/untried/pos/t789.scala +++ b/tests/untried/pos/t789.scala @@ -9,16 +9,16 @@ object main { // don't do this at home type Both = SizeImpl with ColorImpl def info(x:Impl) = x match { - case x:Both => "size "+x.size+" color "+x.color // you wish - case x:SizeImpl => "size "+x.size - case x:ColorImpl => "color "+x.color + case x:Both => "size " + x.size +" color "+ x.color // you wish + case x:SizeImpl => "size " + x.size + case x:ColorImpl => "color " + x.color case _ => "n.a." } def info2(x:Impl) = x match { - case x:SizeImpl with ColorImpl => "size "+x.size+" color "+x.color // you wish - case x:SizeImpl => "size "+x.size - case x:ColorImpl => "color "+x.color + case x:SizeImpl with ColorImpl => "size " + x.size +" color "+ x.color // you wish + case x:SizeImpl => "size " + x.size + case x:ColorImpl => "color " + x.color case _ => "n.a." } diff --git a/tests/untried/pos/unapplyVal.scala b/tests/untried/pos/unapplyVal.scala index 368b9b937..d6dea324f 100644 --- a/tests/untried/pos/unapplyVal.scala +++ b/tests/untried/pos/unapplyVal.scala @@ -12,7 +12,7 @@ class Buffer { x match { case Put => case Put(y) => - println("returning "+y) + println("returning " + y) } } } |