File tree 1 file changed +10
-8
lines changed
compiler/src/dotty/tools/dotc/quoted 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -13,16 +13,18 @@ object Toolbox {
13
13
14
14
private [this ] val driver : QuoteDriver = new QuoteDriver ()
15
15
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
+ }
23
25
}
24
26
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) )
26
28
27
29
}
28
30
}
You can’t perform that action at this time.
0 commit comments