From 4d1c9e2212d8d462ad8664904491c378766a65fa Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Thu, 9 Apr 2015 16:58:43 +0200 Subject: Remove trailing spaces in Dotty tests. --- tests/pos/Bridges.scala | 2 +- tests/pos/Coder.scala | 14 +++++++------- tests/pos/Labels.scala | 8 ++++---- tests/pos/assignments.scala | 6 +++--- tests/pos/blockescapes.scala | 4 ++-- tests/pos/implicits1.scala | 2 +- tests/pos/nameddefaults.scala | 16 ++++++++-------- tests/pos/packageobject.scala | 2 +- tests/pos/selftypes.scala | 18 +++++++++--------- tests/pos/sigs.scala | 24 ++++++++++++------------ tests/pos/templateParents.scala | 4 ++-- 11 files changed, 50 insertions(+), 50 deletions(-) (limited to 'tests/pos') diff --git a/tests/pos/Bridges.scala b/tests/pos/Bridges.scala index a7350d785..6c2115d7e 100644 --- a/tests/pos/Bridges.scala +++ b/tests/pos/Bridges.scala @@ -1,6 +1,6 @@ abstract class X[T]{ def go2(x:T)(y:T = x): T = y - def go: T + def go: T def go1(x: T) = x } diff --git a/tests/pos/Coder.scala b/tests/pos/Coder.scala index 77bbd134c..6eb1ad55a 100644 --- a/tests/pos/Coder.scala +++ b/tests/pos/Coder.scala @@ -7,15 +7,15 @@ class Coder(words: List[String]) { private val mnemonics = Map( '2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL", '6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ") - + ('1', "1") match { - case (digit, str) => true + case (digit, str) => true case _ => false } /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */ - private val charCode0: Map[Char, Char] = mnemonics withFilter { + private val charCode0: Map[Char, Char] = mnemonics withFilter { case (digit, str) => true case _ => false } flatMap { x$1 => @@ -24,18 +24,18 @@ class Coder(words: List[String]) { } } - private val charCode: Map[Char, Char] = + private val charCode: Map[Char, Char] = for ((digit, str) <- mnemonics; ltr <- str) yield ltr -> digit /** Maps a word to the digit string it can represent */ private def wordCode(word: String): String = word map charCode /** A map from digit strings to the words that represent them */ - private val wordsForNum: Map[String, List[String]] = + private val wordsForNum: Map[String, List[String]] = words groupBy wordCode withDefaultValue Nil /** All ways to encode a number as a list of words */ - def encode(number: String): Set[List[String]] = + def encode(number: String): Set[List[String]] = if (number.isEmpty) Set(Nil) else { for { @@ -44,7 +44,7 @@ class Coder(words: List[String]) { rest <- encode(number drop splitPoint) } yield word :: rest }.toSet - + /** Maps a number to a list of all word phrases that can represent it */ def translate(number: String): Set[String] = encode(number) map (_ mkString " ") diff --git a/tests/pos/Labels.scala b/tests/pos/Labels.scala index d82287313..a2271461d 100644 --- a/tests/pos/Labels.scala +++ b/tests/pos/Labels.scala @@ -5,18 +5,18 @@ import dotty.tools.dotc.ast.tpd._ object Labels { def main(args: Array[String]): Unit = { var i = 10 - while(i>0) { + while(i>0) { var j = 0 while(j0) => println("one") case t@2 => println("two" + t) diff --git a/tests/pos/assignments.scala b/tests/pos/assignments.scala index 94223b62c..93abbde20 100644 --- a/tests/pos/assignments.scala +++ b/tests/pos/assignments.scala @@ -4,7 +4,7 @@ object assignments { var i = 0 a(i) = a(i) * 2 a(i+1) += 1 - + class C { var myX = 0 def x = myX @@ -13,11 +13,11 @@ object assignments { x = x + 1 x *= 2 } - + var c = new C c.x =c.x + 1 c.x *= 2 - + val cc = c import cc._ x = x + 1 diff --git a/tests/pos/blockescapes.scala b/tests/pos/blockescapes.scala index 0b6a3ca03..589953fe5 100644 --- a/tests/pos/blockescapes.scala +++ b/tests/pos/blockescapes.scala @@ -1,11 +1,11 @@ object blockescapes { - + { val x = 0; () } val x0 = { class Foo; new Foo } val x1 = {} var x2 = { val z = 0 } val m1 = { val x = 2; x } - + trait T def m0: T = { object Foo { class Bar extends T } ; new Foo.Bar } } diff --git a/tests/pos/implicits1.scala b/tests/pos/implicits1.scala index 47b7f1c52..d8ca76de5 100644 --- a/tests/pos/implicits1.scala +++ b/tests/pos/implicits1.scala @@ -43,7 +43,7 @@ object Implicits { val e: Int = z.foo(true) // Haoyi Li's example on scala-user: - + trait Modifier implicit def stringNode(v: String): Modifier = new Modifier {} diff --git a/tests/pos/nameddefaults.scala b/tests/pos/nameddefaults.scala index 671f14a07..20a0eae47 100644 --- a/tests/pos/nameddefaults.scala +++ b/tests/pos/nameddefaults.scala @@ -1,7 +1,7 @@ object nameddefaults { def foo(first: Int, second: Int = 2, third: Int = 3) = first + second - + var x = 1 var y = 2 @@ -12,7 +12,7 @@ object nameddefaults { foo(1) // named and missing arguments - + foo(first = 1, second = 3) foo(second = 3, first = 1) @@ -20,7 +20,7 @@ object nameddefaults { foo(first = 2, third = 3) foo(2, third = 3) - + // same but with non-idempotent expressions foo(first = x, second = y) @@ -30,11 +30,11 @@ object nameddefaults { foo(first = x, third = y) foo(x, third = y) - + // The same thing, but for classes - + class C(first: Int, second: Int = 2, third: Int = 3) {} - + new C(1, 2, 3) new C(1, 2) @@ -42,7 +42,7 @@ object nameddefaults { new C(1) // named and missing arguments - + new C(first = 1, second = 3) new C(second = 3, first = 1) @@ -50,7 +50,7 @@ object nameddefaults { new C(first = 2, third = 3) new C(2, third = 3) - + // same but with non-idempotent expressions new C(first = x, second = y) diff --git a/tests/pos/packageobject.scala b/tests/pos/packageobject.scala index e88069755..b49a8489a 100644 --- a/tests/pos/packageobject.scala +++ b/tests/pos/packageobject.scala @@ -1,5 +1,5 @@ package test { - object `package` {} + object `package` {} } package object foo {} diff --git a/tests/pos/selftypes.scala b/tests/pos/selftypes.scala index 4bd0dd752..5180419d1 100644 --- a/tests/pos/selftypes.scala +++ b/tests/pos/selftypes.scala @@ -1,20 +1,20 @@ object selftypes { - + trait A { self: AB => - + type AA = List[this.BX] - + class AX - + } - + trait B { self: AB => - + type BB = AA - + class BX } - + class AB extends A with B -} +} diff --git a/tests/pos/sigs.scala b/tests/pos/sigs.scala index 4af4bda90..a9a1b464e 100644 --- a/tests/pos/sigs.scala +++ b/tests/pos/sigs.scala @@ -1,31 +1,31 @@ object sigs { - + type Lst[A] = List[A] - + type Twin[B] = (B, B) - + var x = 7 * 9 - + class Base { - + def foo(x: Int): Any = 33 def foo: Object = "x" - + } - + class Sub extends Base { - + override def foo = "abc" - + override def foo(x: Int) = "abc" } - + trait A { self: B => type AA val a: AA & BB - + } - + trait B { this: A => type BB val b: AA & BB diff --git a/tests/pos/templateParents.scala b/tests/pos/templateParents.scala index 845913270..1bc07b571 100644 --- a/tests/pos/templateParents.scala +++ b/tests/pos/templateParents.scala @@ -1,11 +1,11 @@ object templateParents { // traits do not call a constructor - class C[+T](x: T) + class C[+T](x: T) trait D extends C[String] trait E extends C[Int] new C("abc") with D - + } object templateParents1 { -- cgit v1.2.3