We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59fcde7 commit 23c363eCopy full SHA for 23c363e
compiler/src/dotty/tools/repl/ScriptEngine.scala
@@ -24,7 +24,7 @@ class ScriptEngine extends AbstractScriptEngine {
24
"-color:never",
25
"-Xrepl-disable-display"
26
), Console.out, None)
27
- private val rendering = new Rendering
+ private val rendering = new Rendering(Option(getClass.getClassLoader))
28
private var state: State = driver.initialState
29
30
def getFactory: ScriptEngineFactory = new ScriptEngine.Factory
tests/run-with-compiler/scripting.scala
@@ -3,5 +3,6 @@ object Test {
3
val m = new javax.script.ScriptEngineManager(getClass().getClassLoader())
4
val e = m.getEngineByName("scala")
5
println(e.eval("42"))
6
+ println(e.eval("Some(42)").asInstanceOf[Option[Int]].get)
7
}
8
0 commit comments