@@ -50,8 +50,8 @@ class QuoteCompiler extends Compiler {
50
50
units.map {
51
51
case exprUnit : ExprCompilationUnit =>
52
52
val tree =
53
- if (putInClass) inClass(exprUnit.expr )
54
- else PickledQuotes .quotedExprToTree(checkValidRunExpr(exprUnit.expr .apply(new QuoteContext (ReflectionImpl (ctx)))))
53
+ if (putInClass) inClass(exprUnit.exprBuilder )
54
+ else PickledQuotes .quotedExprToTree(checkValidRunExpr(exprUnit.exprBuilder .apply(new QuoteContext (ReflectionImpl (ctx)))))
55
55
val source = SourceFile .virtual(" <quoted.Expr>" , " " )
56
56
CompilationUnit (source, tree, forceTrees = true )
57
57
}
@@ -67,7 +67,7 @@ class QuoteCompiler extends Compiler {
67
67
* with the following format.
68
68
* `package __root__ { class ' { def apply: Any = <expr> } }`
69
69
*/
70
- private def inClass (expr : scala.quoted. QuoteContext => Expr [_])(implicit ctx : Context ): Tree = {
70
+ private def inClass (exprBuilder : QuoteContext => Expr [_])(implicit ctx : Context ): Tree = {
71
71
val pos = Span (0 )
72
72
val assocFile = new VirtualFile (" <quote>" )
73
73
@@ -76,7 +76,7 @@ class QuoteCompiler extends Compiler {
76
76
cls.enter(ctx.newDefaultConstructor(cls), EmptyScope )
77
77
val meth = ctx.newSymbol(cls, nme.apply, Method , ExprType (defn.AnyType ), coord = pos).entered
78
78
79
- val quoted = PickledQuotes .quotedExprToTree(checkValidRunExpr(expr .apply(new QuoteContext (ReflectionImpl (ctx)))))(ctx.withOwner(meth))
79
+ val quoted = PickledQuotes .quotedExprToTree(checkValidRunExpr(exprBuilder .apply(new QuoteContext (ReflectionImpl (ctx)))))(ctx.withOwner(meth))
80
80
81
81
val run = DefDef (meth, quoted)
82
82
val classTree = ClassDef (cls, DefDef (cls.primaryConstructor.asTerm), run :: Nil )
@@ -87,8 +87,8 @@ class QuoteCompiler extends Compiler {
87
87
}
88
88
89
89
class ExprRun (comp : Compiler , ictx : Context ) extends Run (comp, ictx) {
90
- def compileExpr (expr : scala.quoted. QuoteContext => Expr [_]): Unit = {
91
- val units = new ExprCompilationUnit (expr ) :: Nil
90
+ def compileExpr (exprBuilder : QuoteContext => Expr [_]): Unit = {
91
+ val units = new ExprCompilationUnit (exprBuilder ) :: Nil
92
92
compileUnits(units)
93
93
}
94
94
}
0 commit comments