File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
scala-console/src/main/scala-3/dotty/tools/repl Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,11 @@ class SCIMain(out: PrintStream, loader: ClassLoader) {
4949 // Interpret script execution result
5050 result match
5151 case Success (_) =>
52- SCResults .Success
52+ // Check if the states indicate that there errors during parsing
53+ if state.context.reporter.hasErrors then
54+ SCResults .Error
55+ else
56+ SCResults .Success
5357 case Failure (ex) =>
5458 if wasCausedByImageJMacroAbort(ex) then
5559 out.println(s " WARNING: Detected ImageJ's \" $IMAGEJ_MACRO_CANCELED\" request. Stopping script execution. " )
@@ -58,7 +62,6 @@ class SCIMain(out: PrintStream, loader: ClassLoader) {
5862 // ex.printStackTrace()
5963 // ex.printStackTrace(out)
6064 SCResults .Error
61-
6265 }
6366
6467 private def evalToMethod (script : String ): Option [Method ] = {
You can’t perform that action at this time.
0 commit comments