diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-09-19 20:00:44 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-10-10 13:25:34 +0200 |
commit | 1532c82788ab2366df04cac2e418d3db98390ef4 (patch) | |
tree | cf77d386016cc442c161d7fce347b7fd4e89e3a6 /tests/repl | |
parent | e24289ac19a21c6b3794d02e8fe42766224f173c (diff) | |
download | dotty-1532c82788ab2366df04cac2e418d3db98390ef4.tar.gz dotty-1532c82788ab2366df04cac2e418d3db98390ef4.tar.bz2 dotty-1532c82788ab2366df04cac2e418d3db98390ef4.zip |
Remove duplication of console reporters
Diffstat (limited to 'tests/repl')
-rw-r--r-- | tests/repl/errmsgs.check | 97 | ||||
-rw-r--r-- | tests/repl/imports.check | 22 |
2 files changed, 63 insertions, 56 deletions
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) -<console>:4: Error: type mismatch: -found: Int(1) -required: String -val x: List[String] = List(1) - ^ +-- Error: <console> ------------------------------------------------------------ +3:val x: List[String] = List(1) + ^ + type mismatch: + found: Int(1) + required: String scala> val y: List[List[String]] = List(List(1)) -<console>:4: Error: type mismatch: -found: Int(1) -required: String -val y: List[List[String]] = List(List(1)) - ^ +-- Error: <console> ------------------------------------------------------------ +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")) -<console>:4: Error: type mismatch: -found: Int(1) -required: String -val z: (List[String], List[Int]) = (List(1), List("a")) - ^ -<console>:4: Error: type mismatch: -found: String("a") -required: Int -val z: (List[String], List[Int]) = (List(1), List("a")) - ^ +-- Error: <console> ------------------------------------------------------------ +3:val z: (List[String], List[Int]) = (List(1), List("a")) + ^ + type mismatch: + found: Int(1) + required: String +-- Error: <console> ------------------------------------------------------------ +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)) -<console>: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: <console> ------------------------------------------------------------ +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) -<console>:5: Error: type mismatch: -found: Int(1) -required: String -val b: Inv[String] = new Inv(1) - ^ +-- Error: <console> ------------------------------------------------------------ +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 { } } } -<console>: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 - ^ -<console>:13: Error: type mismatch: +-- Error: <console> ------------------------------------------------------------ +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: <console> ------------------------------------------------------------ +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 -<console>:11: Error: type mismatch: -found: scala.collection.immutable.List[Int](o.xs) -required: String -buf += xs - ^ -<console>:11: Error: type mismatch: -found: String -required: scala.collection.mutable.ListBuffer[Int] -buf += xs -^ +-- Error: <console> ------------------------------------------------------------ +10:buf += xs + ^^ + type mismatch: + found: scala.collection.immutable.List[Int](o.xs) + required: String +-- Error: <console> ------------------------------------------------------------ +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 |