@@ -50,8 +50,8 @@ class QuoteCompiler extends Compiler {
5050 units.map {
5151 case exprUnit : ExprCompilationUnit =>
5252 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)))))
5555 val source = SourceFile .virtual(" <quoted.Expr>" , " " )
5656 CompilationUnit (source, tree, forceTrees = true )
5757 }
@@ -67,7 +67,7 @@ class QuoteCompiler extends Compiler {
6767 * with the following format.
6868 * `package __root__ { class ' { def apply: Any = <expr> } }`
6969 */
70- private def inClass (expr : scala.quoted. QuoteContext => Expr [_])(implicit ctx : Context ): Tree = {
70+ private def inClass (exprBuilder : QuoteContext => Expr [_])(implicit ctx : Context ): Tree = {
7171 val pos = Span (0 )
7272 val assocFile = new VirtualFile (" <quote>" )
7373
@@ -76,7 +76,7 @@ class QuoteCompiler extends Compiler {
7676 cls.enter(ctx.newDefaultConstructor(cls), EmptyScope )
7777 val meth = ctx.newSymbol(cls, nme.apply, Method , ExprType (defn.AnyType ), coord = pos).entered
7878
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))
8080
8181 val run = DefDef (meth, quoted)
8282 val classTree = ClassDef (cls, DefDef (cls.primaryConstructor.asTerm), run :: Nil )
@@ -87,8 +87,8 @@ class QuoteCompiler extends Compiler {
8787 }
8888
8989 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
9292 compileUnits(units)
9393 }
9494 }
0 commit comments