File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
compiler/test/dotty/tools/dotc/repl Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import org.junit.Test
10
10
11
11
/** A subclass of REPL used for testing.
12
12
* It takes a transcript of a REPL session in `script`. The transcript
13
- * starts with the first input prompt `scala> ` and ends with `scala> :quit` and a newline .
13
+ * starts with the first input prompt `scala> ` and ends with `scala> :quit`.
14
14
* Invoking `process()` on the `TestREPL` runs all input lines and
15
15
* collects then interleaved with REPL output in a string writer `out`.
16
16
* Invoking `check()` checks that the collected output matches the original
@@ -26,6 +26,7 @@ class TestREPL(script: String) extends REPL {
26
26
override def context (ctx : Context ) = {
27
27
val fresh = ctx.fresh
28
28
fresh.setSetting(ctx.settings.color, " never" )
29
+ fresh.setSetting(ctx.settings.unchecked, true )
29
30
fresh.setSetting(ctx.settings.classpath, Jars .dottyReplDeps.mkString(" :" ))
30
31
fresh.initialize()(fresh)
31
32
fresh
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ scala> { def f: Int = g; val x: Int = 1; def g: Int = 5; }
93
93
94
94
longer explanation available when compiling with `-explain`
95
95
scala> def unsafeCast[S](a: Any) = a match { case s: S => s; case _ => ??? }
96
- -- Warning: <console> ----------------------------- -----------------------------
96
+ -- [E034] Erased Type Unchecked Warning: <console> -----------------------------
97
97
4 |def unsafeCast[S](a: Any) = a match { case s: S => s; case _ => ??? }
98
98
| ^
99
99
| abstract type pattern is unchecked since it is eliminated by erasure
You can’t perform that action at this time.
0 commit comments