Avoid NPE on Run.<init>

This commit is contained in:
Jason Zaugg 2019-02-22 09:31:44 +10:00
parent 45f5019ee0
commit 3cbbe93c6e
1 changed files with 4 additions and 1 deletions

View File

@ -89,7 +89,10 @@ final class Eval(
*/
final class EvalGlobal(settings: Settings, reporter: Reporter)
extends Global(settings, reporter) {
override def currentRun: Run = curRun
override def currentRun: Run = curRun match {
case null => super.currentRun // https://github.com/scala/bug/issues/11381
case r => r
}
var curRun: Run = null
}
lazy val global: EvalGlobal = new EvalGlobal(settings, reporter)