File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
compiler/test-resources/repl Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ scala>:silent
2
+ scala> 1+1
3
+ scala> case class A(x: Int)
4
+ scala> A("string")
5
+ -- [E007] Type Mismatch Error: -------------------------------------------------
6
+ 1 | A("string")
7
+ | ^^^^^^^^
8
+ | Found: ("string" : String)
9
+ | Required: Int
10
+ |
11
+ | longer explanation available when compiling with `-explain`
12
+ 1 error found
13
+ scala> Option[Int](2) match { case Some(x) => x }
14
+ 1 warning found
15
+ -- [E029] Pattern Match Exhaustivity Warning: ----------------------------------
16
+ 1 | Option[Int](2) match { case Some(x) => x }
17
+ | ^^^^^^^^^^^^^^
18
+ | match may not be exhaustive.
19
+ |
20
+ | It would fail on pattern case: None
21
+ |
22
+ | longer explanation available when compiling with `-explain`
23
+ scala>:silent
24
+ scala> 1 + 2
25
+ val res2: Int = 3
You can’t perform that action at this time.
0 commit comments