Skip to content

Commit 25002da

Browse files
authored
Merge pull request #22 from sjrd/final-val-undefined
Make `Undefined` a `final val` so that it can be constant-folded.
2 parents d57afef + ff352da commit 25002da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/scalajs/macrotaskexecutor/MacrotaskExecutor.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import scala.util.control.NonFatal
2626
* Based on https://github.com/YuzuJS/setImmediate
2727
*/
2828
object MacrotaskExecutor extends ExecutionContextExecutor {
29-
private[this] val Undefined = "undefined"
29+
private[this] final val Undefined = "undefined"
3030

3131
def execute(runnable: Runnable): Unit =
3232
setImmediate(() => runnable.run())

0 commit comments

Comments
 (0)