You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: compiler/test-resources/repl/errmsgs
+26-13
Original file line number
Diff line number
Diff line change
@@ -6,45 +6,51 @@ scala> val x: List[String] = List(1)
6
6
| ^
7
7
| Found: (1 : Int)
8
8
| Required: String
9
-
longer explanation available when compiling with `-explain`
9
+
|
10
+
| longer explanation available when compiling with `-explain`
10
11
1 error found
11
12
scala> val y: List[List[String]] = List(List(1))
12
13
-- [E007] Type Mismatch Error: -------------------------------------------------
13
14
1 | val y: List[List[String]] = List(List(1))
14
15
| ^
15
16
| Found: (1 : Int)
16
17
| Required: String
17
-
longer explanation available when compiling with `-explain`
18
+
|
19
+
| longer explanation available when compiling with `-explain`
18
20
1 error found
19
21
scala> val z: (List[String], List[Int]) = (List(1), List("a"))
20
22
-- [E007] Type Mismatch Error: -------------------------------------------------
21
23
1 | val z: (List[String], List[Int]) = (List(1), List("a"))
22
24
| ^
23
25
| Found: (1 : Int)
24
26
| Required: String
25
-
longer explanation available when compiling with `-explain`
27
+
|
28
+
| longer explanation available when compiling with `-explain`
26
29
-- [E007] Type Mismatch Error: -------------------------------------------------
27
30
1 | val z: (List[String], List[Int]) = (List(1), List("a"))
28
31
| ^^^
29
32
| Found: ("a" : String)
30
33
| Required: Int
31
-
longer explanation available when compiling with `-explain`
34
+
|
35
+
| longer explanation available when compiling with `-explain`
32
36
2 errors found
33
37
scala> val a: Inv[String] = new Inv(new Inv(1))
34
38
-- [E007] Type Mismatch Error: -------------------------------------------------
35
39
1 | val a: Inv[String] = new Inv(new Inv(1))
36
40
| ^^^^^^^^^^
37
41
| Found: Inv[Int]
38
42
| Required: String
39
-
longer explanation available when compiling with `-explain`
43
+
|
44
+
| longer explanation available when compiling with `-explain`
40
45
1 error found
41
46
scala> val b: Inv[String] = new Inv(1)
42
47
-- [E007] Type Mismatch Error: -------------------------------------------------
43
48
1 | val b: Inv[String] = new Inv(1)
44
49
| ^
45
50
| Found: (1 : Int)
46
51
| Required: String
47
-
longer explanation available when compiling with `-explain`
52
+
|
53
+
| longer explanation available when compiling with `-explain`
48
54
1 error found
49
55
scala> 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() } }; }
50
56
-- [E007] Type Mismatch Error: -------------------------------------------------
@@ -55,7 +61,8 @@ scala> abstract class C { type T; val x: T; val s: Unit = { type T = String; var
55
61
|
56
62
|where: T is a type in class C
57
63
| T² is a type in the initializer of value s which is an alias of String
58
-
longer explanation available when compiling with `-explain`
64
+
|
65
+
| longer explanation available when compiling with `-explain`
59
66
-- [E007] Type Mismatch Error: -------------------------------------------------
60
67
1 | 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() } }; }
61
68
| ^
@@ -64,7 +71,8 @@ longer explanation available when compiling with `-explain`
64
71
|
65
72
|where: T is a type in the initializer of value s which is an alias of String
66
73
| T² is a type in method f which is an alias of Int
67
-
longer explanation available when compiling with `-explain`
74
+
|
75
+
| longer explanation available when compiling with `-explain`
68
76
2 errors found
69
77
scala> class Foo() { def bar: Int = 1 }; val foo = new Foo(); foo.barr
70
78
-- [E008] Not Found Error: -----------------------------------------------------
0 commit comments