Skip to content

Commit 2ef4212

Browse files
committed
Use Phase::isRunnable infrastructure in GenSJSIR phase
1 parent cce1d81 commit 2ef4212

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

compiler/src/dotty/tools/backend/sjs/GenSJSIR.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ import Phases._
88
class GenSJSIR extends Phase {
99
def phaseName: String = "genSJSIR"
1010

11-
def run(implicit ctx: Context): Unit = {
12-
if (ctx.settings.scalajs.value)
13-
new JSCodeGen().run()
14-
}
11+
override def isRunnable(implicit ctx: Context): Boolean =
12+
super.isRunnable && ctx.settings.scalajs.value
13+
14+
def run(implicit ctx: Context): Unit =
15+
new JSCodeGen().run()
1516
}

0 commit comments

Comments
 (0)