Skip to content
This repository was archived by the owner on Sep 1, 2020. It is now read-only.

Commit f865e3b

Browse files
committed
Test adjustments.
1 parent 317a105 commit f865e3b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/compiler/scala/tools/nsc/interpreter/IMain.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ class IMain(initialSettings: Settings, protected val out: JPrintWriter) extends
583583
def interpretSynthetic(line: String): IR.Result = interpret(line, true)
584584
def interpret(line: String, synthetic: Boolean): IR.Result = {
585585
def loadAndRunReq(req: Request) = {
586+
classLoader.setAsContext()
586587
val (result, succeeded) = req.loadAndRun
587588

588589
/** To our displeasure, ConsoleReporter offers only printMessage,

test/files/run/xml-loop-bug.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
object Test {
22
def main(args: Array[String]): Unit = {
3-
scala.tools.nsc.io.NullPrintStream.setOutAndErr()
3+
val sink = new java.io.PrintStream(new java.io.ByteArrayOutputStream())
4+
Console setOut sink
5+
Console setErr sink
46
scala.xml.parsing.ConstructingParser.fromSource(scala.io.Source.fromString("<!DOCTYPE xmeml SYSTEM> <xmeml> <sequence> </sequence> </xmeml> "), true).document.docElem
57
}
68
}

0 commit comments

Comments
 (0)