Skip to content

Commit

Permalink
Add replTest for :silent command
Browse files Browse the repository at this point in the history
  • Loading branch information
natsukagami committed Dec 19, 2024
1 parent 98311d6 commit 41f6869
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions compiler/test-resources/repl/silent
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
scala>:silent
scala> 1+1
scala> case class A(x: Int)
scala> A("string")
-- [E007] Type Mismatch Error: -------------------------------------------------
1 | A("string")
| ^^^^^^^^
| Found: ("string" : String)
| Required: Int
|
| longer explanation available when compiling with `-explain`
1 error found
scala> Option[Int](2) match { case Some(x) => x }
1 warning found
-- [E029] Pattern Match Exhaustivity Warning: ----------------------------------
1 | Option[Int](2) match { case Some(x) => x }
| ^^^^^^^^^^^^^^
| match may not be exhaustive.
|
| It would fail on pattern case: None
|
| longer explanation available when compiling with `-explain`
scala>:silent
scala> 1 + 2
val res2: Int = 3

0 comments on commit 41f6869

Please sign in to comment.