From 1532c82788ab2366df04cac2e418d3db98390ef4 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Mon, 19 Sep 2016 20:00:44 +0200 Subject: Remove duplication of console reporters --- tests/repl/errmsgs.check | 97 +++++++++++++++++++++++++----------------------- tests/repl/imports.check | 22 ++++++----- 2 files changed, 63 insertions(+), 56 deletions(-) (limited to 'tests/repl') diff --git a/tests/repl/errmsgs.check b/tests/repl/errmsgs.check index e32e72d1f..d8c1b9215 100644 --- a/tests/repl/errmsgs.check +++ b/tests/repl/errmsgs.check @@ -1,43 +1,48 @@ scala> class Inv[T](x: T) defined class Inv scala> val x: List[String] = List(1) -:4: Error: type mismatch: -found: Int(1) -required: String -val x: List[String] = List(1) - ^ +-- Error: ------------------------------------------------------------ +3:val x: List[String] = List(1) + ^ + type mismatch: + found: Int(1) + required: String scala> val y: List[List[String]] = List(List(1)) -:4: Error: type mismatch: -found: Int(1) -required: String -val y: List[List[String]] = List(List(1)) - ^ +-- Error: ------------------------------------------------------------ +3:val y: List[List[String]] = List(List(1)) + ^ + type mismatch: + found: Int(1) + required: String scala> val z: (List[String], List[Int]) = (List(1), List("a")) -:4: Error: type mismatch: -found: Int(1) -required: String -val z: (List[String], List[Int]) = (List(1), List("a")) - ^ -:4: Error: type mismatch: -found: String("a") -required: Int -val z: (List[String], List[Int]) = (List(1), List("a")) - ^ +-- Error: ------------------------------------------------------------ +3:val z: (List[String], List[Int]) = (List(1), List("a")) + ^ + type mismatch: + found: Int(1) + required: String +-- Error: ------------------------------------------------------------ +3:val z: (List[String], List[Int]) = (List(1), List("a")) + ^ + type mismatch: + found: String("a") + required: Int scala> val a: Inv[String] = new Inv(new Inv(1)) -:5: Error: type mismatch: -found: Inv[T] -required: String - -where T is a type variable with constraint >: Int(1) - -val a: Inv[String] = new Inv(new Inv(1)) - ^ +-- Error: ------------------------------------------------------------ +4:val a: Inv[String] = new Inv(new Inv(1)) + ^^^^ + type mismatch: + found: Inv[T] + required: String + + where T is a type variable with constraint >: Int(1) scala> val b: Inv[String] = new Inv(1) -:5: Error: type mismatch: -found: Int(1) -required: String -val b: Inv[String] = new Inv(1) - ^ +-- Error: ------------------------------------------------------------ +4:val b: Inv[String] = new Inv(1) + ^ + type mismatch: + found: Int(1) + required: String scala> abstract class C { type T val x: T @@ -53,22 +58,22 @@ scala> abstract class C { } } } -:9: Error: type mismatch: -found: C.this.T(C.this.x) -required: T' - -where T is a type in class C - T' is a type in the initalizer of value s which is an alias of String - - var y: T = x - ^ -:13: Error: type mismatch: +-- Error: ------------------------------------------------------------ +8: var y: T = x + ^ + type mismatch: + found: C.this.T(C.this.x) + required: T' + + where T is a type in class C + T' is a type in the initalizer of value s which is an alias of String +-- Error: ------------------------------------------------------------ +12: val z: T = y + ^ +type mismatch: found: T(y) required: T' where T is a type in the initalizer of value s which is an alias of String T' is a type in method f which is an alias of Int - - val z: T = y - ^ scala> :quit diff --git a/tests/repl/imports.check b/tests/repl/imports.check index 50b7a93d7..f9e48c011 100644 --- a/tests/repl/imports.check +++ b/tests/repl/imports.check @@ -7,16 +7,18 @@ defined module o scala> import o._ import o._ scala> buf += xs -:11: Error: type mismatch: -found: scala.collection.immutable.List[Int](o.xs) -required: String -buf += xs - ^ -:11: Error: type mismatch: -found: String -required: scala.collection.mutable.ListBuffer[Int] -buf += xs -^ +-- Error: ------------------------------------------------------------ +10:buf += xs + ^^ + type mismatch: + found: scala.collection.immutable.List[Int](o.xs) + required: String +-- Error: ------------------------------------------------------------ +10:buf += xs + ^^^^^^^^^ + type mismatch: + found: String + required: scala.collection.mutable.ListBuffer[Int] scala> buf ++= xs res1: scala.collection.mutable.ListBuffer[Int] = ListBuffer(1, 2, 3) scala> :quit -- cgit v1.2.3