Skip to content

Commit 41f6869

Browse files
committed
Add replTest for :silent command
1 parent 98311d6 commit 41f6869

File tree

1 file changed

+25
-0
lines changed
  • compiler/test-resources/repl

1 file changed

+25
-0
lines changed

compiler/test-resources/repl/silent

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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

0 commit comments

Comments
 (0)