File tree 2 files changed +3
-2
lines changed
compiler/test/dotty/tools/dotc/repl
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import java.io.StringWriter
8
8
9
9
/** A subclass of REPL used for testing.
10
10
* It takes a transcript of a REPL session in `script`. The transcript
11
- * starts with the first input prompt `scala> ` and ends with `scala> :quit` and a newline .
11
+ * starts with the first input prompt `scala> ` and ends with `scala> :quit`.
12
12
* Invoking `process()` on the `TestREPL` runs all input lines and
13
13
* collects then interleaved with REPL output in a string writer `out`.
14
14
* Invoking `check()` checks that the collected output matches the original
@@ -24,6 +24,7 @@ class TestREPL(script: String) extends REPL {
24
24
override def context (ctx : Context ) = {
25
25
val fresh = ctx.fresh
26
26
fresh.setSetting(ctx.settings.color, " never" )
27
+ fresh.setSetting(ctx.settings.unchecked, true )
27
28
fresh.setSetting(ctx.settings.classpath, Jars .dottyReplDeps.mkString(" :" ))
28
29
fresh.initialize()(fresh)
29
30
fresh
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ scala> 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> def unsafeCast[S](a: Any) = a match { case s: S => s; case _ => ??? }
82
- -- Warning: <console> ----------------------------- -----------------------------
82
+ -- [E034] Erased Type Unchecked Warning: <console> -----------------------------
83
83
4 |def unsafeCast[S](a: Any) = a match { case s: S => s; case _ => ??? }
84
84
| ^
85
85
| abstract type pattern is unchecked since it is eliminated by erasure
You can’t perform that action at this time.
0 commit comments