Merge pull request #4549 from retronym/topic/currun

Avoid NPE on Run.<init>
This commit is contained in:
eugene yokota 2019-02-21 21:11:50 -05:00 committed by GitHub
commit b747309fb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)