@@ -6,45 +6,57 @@ scala> val x: List[String] = List(1)
66 | ^
77 | Found: (1 : Int)
88 | Required: String
9- longer explanation available when compiling with `-explain`
9+ |-----------------------------------------------------------------------------
10+ | longer explanation available when compiling with `-explain`
11+ ·-----------------------------------------------------------------------------
10121 error found
1113scala> val y: List[List[String]] = List(List(1))
1214-- [E007] Type Mismatch Error: -------------------------------------------------
13151 | val y: List[List[String]] = List(List(1))
1416 | ^
1517 | Found: (1 : Int)
1618 | Required: String
17- longer explanation available when compiling with `-explain`
19+ |-----------------------------------------------------------------------------
20+ | longer explanation available when compiling with `-explain`
21+ ·-----------------------------------------------------------------------------
18221 error found
1923scala> val z: (List[String], List[Int]) = (List(1), List("a"))
2024-- [E007] Type Mismatch Error: -------------------------------------------------
21251 | val z: (List[String], List[Int]) = (List(1), List("a"))
2226 | ^
2327 | Found: (1 : Int)
2428 | Required: String
25- longer explanation available when compiling with `-explain`
29+ |-----------------------------------------------------------------------------
30+ | longer explanation available when compiling with `-explain`
31+ ·-----------------------------------------------------------------------------
2632-- [E007] Type Mismatch Error: -------------------------------------------------
27331 | val z: (List[String], List[Int]) = (List(1), List("a"))
2834 | ^^^
2935 | Found: ("a" : String)
3036 | Required: Int
31- longer explanation available when compiling with `-explain`
37+ |-----------------------------------------------------------------------------
38+ | longer explanation available when compiling with `-explain`
39+ ·-----------------------------------------------------------------------------
32402 errors found
3341scala> val a: Inv[String] = new Inv(new Inv(1))
3442-- [E007] Type Mismatch Error: -------------------------------------------------
35431 | val a: Inv[String] = new Inv(new Inv(1))
3644 | ^^^^^^^^^^
3745 | Found: Inv[Int]
3846 | Required: String
39- longer explanation available when compiling with `-explain`
47+ |-----------------------------------------------------------------------------
48+ | longer explanation available when compiling with `-explain`
49+ ·-----------------------------------------------------------------------------
40501 error found
4151scala> val b: Inv[String] = new Inv(1)
4252-- [E007] Type Mismatch Error: -------------------------------------------------
43531 | val b: Inv[String] = new Inv(1)
4454 | ^
4555 | Found: (1 : Int)
4656 | Required: String
47- longer explanation available when compiling with `-explain`
57+ |-----------------------------------------------------------------------------
58+ | longer explanation available when compiling with `-explain`
59+ ·-----------------------------------------------------------------------------
48601 error found
4961scala> abstract class C { type T; val x: T; val s: Unit = { type T = String; var y: T = x; locally { def f() = { type T = Int; val z: T = y }; f() } }; }
5062-- [E007] Type Mismatch Error: -------------------------------------------------
@@ -55,7 +67,9 @@ scala> abstract class C { type T; val x: T; val s: Unit = { type T = String; var
5567 |
5668 |where: T is a type in class C
5769 | T² is a type in the initializer of value s which is an alias of String
58- longer explanation available when compiling with `-explain`
70+ |-----------------------------------------------------------------------------
71+ | longer explanation available when compiling with `-explain`
72+ ·-----------------------------------------------------------------------------
5973-- [E007] Type Mismatch Error: -------------------------------------------------
60741 | abstract class C { type T; val x: T; val s: Unit = { type T = String; var y: T = x; locally { def f() = { type T = Int; val z: T = y }; f() } }; }
6175 | ^
@@ -64,7 +78,9 @@ longer explanation available when compiling with `-explain`
6478 |
6579 |where: T is a type in the initializer of value s which is an alias of String
6680 | T² is a type in method f which is an alias of Int
67- longer explanation available when compiling with `-explain`
81+ |-----------------------------------------------------------------------------
82+ | longer explanation available when compiling with `-explain`
83+ ·-----------------------------------------------------------------------------
68842 errors found
6985scala> class Foo() { def bar: Int = 1 }; val foo = new Foo(); foo.barr
7086-- [E008] Not Found Error: -----------------------------------------------------
@@ -78,33 +94,43 @@ scala> val x: List[Int] = "foo" :: List(1)
7894 | ^^^^^
7995 | Found: ("foo" : String)
8096 | Required: Int
81- longer explanation available when compiling with `-explain`
97+ |-----------------------------------------------------------------------------
98+ | longer explanation available when compiling with `-explain`
99+ ·-----------------------------------------------------------------------------
821001 error found
83101scala> while ((( foo ))) {}
84102-- [E006] Not Found Error: -----------------------------------------------------
851031 | while ((( foo ))) {}
86104 | ^^^
87105 | Not found: foo
88- longer explanation available when compiling with `-explain`
106+ |-----------------------------------------------------------------------------
107+ | longer explanation available when compiling with `-explain`
108+ ·-----------------------------------------------------------------------------
891091 error found
90110scala> val a: iDontExist = 1
91111-- [E006] Not Found Error: -----------------------------------------------------
921121 | val a: iDontExist = 1
93113 | ^^^^^^^^^^
94114 | Not found: type iDontExist
95- longer explanation available when compiling with `-explain`
115+ |-----------------------------------------------------------------------------
116+ | longer explanation available when compiling with `-explain`
117+ ·-----------------------------------------------------------------------------
961181 error found
97119scala> def foo1(x: => Int) = x _
98120-- [E099] Syntax Error: --------------------------------------------------------
991211 | def foo1(x: => Int) = x _
100122 | ^^^
101123 |Only function types can be followed by _ but the current expression has type Int
102- longer explanation available when compiling with `-explain`
124+ |-----------------------------------------------------------------------------
125+ | longer explanation available when compiling with `-explain`
126+ ·-----------------------------------------------------------------------------
1031271 error found
104128scala> def foo2(x: => Int): () => Int = x _
105129-- [E099] Syntax Error: --------------------------------------------------------
1061301 | def foo2(x: => Int): () => Int = x _
107131 | ^^^
108132 |Only function types can be followed by _ but the current expression has type Int
109- longer explanation available when compiling with `-explain`
133+ |-----------------------------------------------------------------------------
134+ | longer explanation available when compiling with `-explain`
135+ ·-----------------------------------------------------------------------------
1101361 error found
0 commit comments