diff --git a/compiler/src/dotty/tools/dotc/quoted/Toolbox.scala b/compiler/src/dotty/tools/dotc/quoted/Toolbox.scala index fa18a4843331..72d35f6159d8 100644 --- a/compiler/src/dotty/tools/dotc/quoted/Toolbox.scala +++ b/compiler/src/dotty/tools/dotc/quoted/Toolbox.scala @@ -19,10 +19,10 @@ object Toolbox { case expr: TastyTreeExpr[Tree] @unchecked => throw new Exception("Cannot call `Expr.run` on an `Expr` that comes from an inline macro argument.") case _ => - driver.run(expr, settings) + synchronized(driver.run(expr, settings)) } - def show[T](expr: Expr[T]): String = driver.show(expr, settings) + def show[T](expr: Expr[T]): String = synchronized(driver.show(expr, settings)) } }