Closed
Description
Cannot evaluate any Scala code in ScriptREPL due to error:
-- [E032] Syntax Error: --------------------------------------------------------
212 |val object : org.scijava.object.DefaultObjectService = {
| ^^^^^^
| pattern expected
|
| longer explanation available when compiling with `-explain`
java.lang.ClassNotFoundException: rs$line$0
at dotty.tools.repl.AbstractFileClassLoader.findClass(AbstractFileClassLoader.scala:51)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
...
One of the variables passed from ScriptREPL to ScalaAdaptedScriptEngine
is called object
leading to internal error in binding variables.
The can be addressed, on Scala side, using name in backticks while binding. In this case Scala variable would be called `object`
.