aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-09-21 10:09:13 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-10-10 13:25:35 +0200
commitaa559359bb55729913d34588462542f10c42e147 (patch)
treea42ca5b5e1b58dfa735c5239c04bd5e838d95d48 /tests
parent8743fa86e25133d0ddea3d85d7df0a5ceadef83a (diff)
downloaddotty-aa559359bb55729913d34588462542f10c42e147.tar.gz
dotty-aa559359bb55729913d34588462542f10c42e147.tar.bz2
dotty-aa559359bb55729913d34588462542f10c42e147.zip
Refactor explanation interpolator
Diffstat (limited to 'tests')
-rw-r--r--tests/repl/errmsgs.check61
-rw-r--r--tests/repl/imports.check8
2 files changed, 33 insertions, 36 deletions
diff --git a/tests/repl/errmsgs.check b/tests/repl/errmsgs.check
index d8c1b9215..8f86aac08 100644
--- a/tests/repl/errmsgs.check
+++ b/tests/repl/errmsgs.check
@@ -1,48 +1,47 @@
scala> class Inv[T](x: T)
defined class Inv
scala> val x: List[String] = List(1)
--- Error: <console> ------------------------------------------------------------
+-- [E006] Type Mismatch 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))
--- Error: <console> ------------------------------------------------------------
+-- [E006] Type Mismatch 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"))
--- Error: <console> ------------------------------------------------------------
+-- [E006] Type Mismatch Error: <console> -------------------------------------------------------------------------------
3:val z: (List[String], List[Int]) = (List(1), List("a"))
^
- type mismatch:
found: Int(1)
required: String
--- Error: <console> ------------------------------------------------------------
+
+-- [E006] Type Mismatch 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))
--- Error: <console> ------------------------------------------------------------
+-- [E006] Type Mismatch 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)
+ ^^^^^
+ found: Inv[T]
+ required: String
+
+ T is a type variable with constraint >: Int(1)
scala> val b: Inv[String] = new Inv(1)
--- Error: <console> ------------------------------------------------------------
+-- [E006] Type Mismatch 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
@@ -58,22 +57,20 @@ scala> abstract class C {
}
}
}
--- Error: <console> ------------------------------------------------------------
+-- [E006] 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> ------------------------------------------------------------
+ found: C.this.T(C.this.x)
+ required: T
+
+ T is a type in class C
+ T' is a type in the initalizer of value s which is an alias of String
+-- [E006] Type Mismatch 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
+ found: T(y)
+ required: T
+
+ 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
scala> :quit
diff --git a/tests/repl/imports.check b/tests/repl/imports.check
index f9e48c011..2e8d5dcf9 100644
--- a/tests/repl/imports.check
+++ b/tests/repl/imports.check
@@ -7,18 +7,18 @@ defined module o
scala> import o._
import o._
scala> buf += xs
--- Error: <console> ------------------------------------------------------------
+-- [E006] Type Mismatch Error: <console> -------------------------------------------------------------------------------
10:buf += xs
^^
- type mismatch:
found: scala.collection.immutable.List[Int](o.xs)
required: String
--- Error: <console> ------------------------------------------------------------
+
+-- [E006] Type Mismatch 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