File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
compiler/src/dotty/tools/dotc/quoted Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -13,16 +13,18 @@ object Toolbox {
1313
1414 private [this ] val driver : QuoteDriver = new QuoteDriver ()
1515
16- def run [T ](expr : Expr [T ]): T = expr match {
17- case expr : LiftedExpr [T ] =>
18- expr.value
19- case expr : TastyTreeExpr [Tree ] @ unchecked =>
20- throw new Exception (" Cannot call `Expr.run` on an `Expr` that comes from an inline macro argument." )
21- case _ =>
22- driver.run(expr, settings)
16+ def run [T ](expr : Expr [T ]): T = synchronized {
17+ expr match {
18+ case expr : LiftedExpr [T ] =>
19+ expr.value
20+ case expr : TastyTreeExpr [Tree ] @ unchecked =>
21+ throw new Exception (" Cannot call `Expr.run` on an `Expr` that comes from an inline macro argument." )
22+ case _ =>
23+ driver.run(expr, settings)
24+ }
2325 }
2426
25- def show [T ](expr : Expr [T ]): String = driver.show(expr, settings)
27+ def show [T ](expr : Expr [T ]): String = synchronized ( driver.show(expr, settings) )
2628
2729 }
2830}
You can’t perform that action at this time.
0 commit comments