1
1
scala> class Inv[T](x: T)
2
2
defined class Inv
3
3
scala> val x: List[String] = List(1)
4
- -- [E007] Type Mismatch Error: <console> ----- ----------------------------------
4
+ -- [E007] Type Mismatch Error: <console>:4:27 ----------------------------------
5
5
4 |val x: List[String] = List(1)
6
6
| ^
7
7
| found: Int(1)
8
8
| required: String
9
9
|
10
10
scala> val y: List[List[String]] = List(List(1))
11
- -- [E007] Type Mismatch Error: <console> ----- ----------------------------------
11
+ -- [E007] Type Mismatch Error: <console>:4:38 ----------------------------------
12
12
4 |val y: List[List[String]] = List(List(1))
13
13
| ^
14
14
| found: Int(1)
15
15
| required: String
16
16
|
17
17
scala> val z: (List[String], List[Int]) = (List(1), List("a"))
18
- -- [E007] Type Mismatch Error: <console> ----- ----------------------------------
18
+ -- [E007] Type Mismatch Error: <console>:4:41 ----------------------------------
19
19
4 |val z: (List[String], List[Int]) = (List(1), List("a"))
20
20
| ^
21
21
| found: Int(1)
22
22
| required: String
23
23
|
24
- -- [E007] Type Mismatch Error: <console> ----- ----------------------------------
24
+ -- [E007] Type Mismatch Error: <console>:4:50 ----------------------------------
25
25
4 |val z: (List[String], List[Int]) = (List(1), List("a"))
26
26
| ^^^
27
27
| found: String("a")
28
28
| required: Int
29
29
|
30
30
scala> val a: Inv[String] = new Inv(new Inv(1))
31
- -- [E007] Type Mismatch Error: <console> ----- ----------------------------------
31
+ -- [E007] Type Mismatch Error: <console>:5:33 ----------------------------------
32
32
5 |val a: Inv[String] = new Inv(new Inv(1))
33
33
| ^^^^^
34
34
| found: Inv[T]
35
35
| required: String
36
36
|
37
37
| where: T is a type variable with constraint >: Int(1)
38
38
scala> val b: Inv[String] = new Inv(1)
39
- -- [E007] Type Mismatch Error: <console> ----- ----------------------------------
39
+ -- [E007] Type Mismatch Error: <console>:5:29 ----------------------------------
40
40
5 |val b: Inv[String] = new Inv(1)
41
41
| ^
42
42
| found: Int(1)
@@ -57,15 +57,15 @@ scala> abstract class C {
57
57
}
58
58
}
59
59
}
60
- -- [E007] Type Mismatch Error: <console> ----- ----------------------------------
60
+ -- [E007] Type Mismatch Error: <console>:9:17 ----------------------------------
61
61
9 | var y: T = x
62
62
| ^
63
63
|found: C.this.T(C.this.x)
64
64
|required: T'
65
65
|
66
66
|where: T is a type in class C
67
67
| T' is a type in the initalizer of value s which is an alias of String
68
- -- [E007] Type Mismatch Error: <console> ------ ---------------------------------
68
+ -- [E007] Type Mismatch Error: <console>:13:21 ---------------------------------
69
69
13 | val z: T = y
70
70
| ^
71
71
|found: T(y)
@@ -74,19 +74,19 @@ scala> abstract class C {
74
74
|where: T is a type in the initalizer of value s which is an alias of String
75
75
| T' is a type in method f which is an alias of Int
76
76
scala> class Foo() { def bar: Int = 1 }; val foo = new Foo(); foo.barr
77
- -- [E008] Member Not Found Error: <console> ----- -------------------------------
77
+ -- [E008] Member Not Found Error: <console>:4:59 -------------------------------
78
78
4 |class Foo() { def bar: Int = 1 }; val foo = new Foo(); foo.barr
79
79
| ^^^^^^^^
80
80
| value `barr` is not a member of Foo(foo) - did you mean `foo.bar`?
81
81
scala> val x: List[Int] = "foo" :: List(1)
82
- -- [E007] Type Mismatch Error: <console> ----- ----------------------------------
82
+ -- [E007] Type Mismatch Error: <console>:4:19 ----------------------------------
83
83
4 |val x: List[Int] = "foo" :: List(1)
84
84
| ^^^^^
85
85
| found: String($1$)
86
86
| required: Int
87
87
|
88
88
scala> { def f: Int = g; val x: Int = 1; def g: Int = 5; }
89
- -- [E038] Reference Error: <console> ----- --------------------------------------
89
+ -- [E038] Reference Error: <console>:5:15 --------------------------------------
90
90
5 |{ def f: Int = g; val x: Int = 1; def g: Int = 5; }
91
91
| ^
92
92
| `g` is a forward reference extending over the definition of `x`
0 commit comments