@@ -89,7 +89,7 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
8989 import ast .tpd ._
9090
9191 /** Classloader used for loading macros */
92- private var macroClassLoader : java.lang.ClassLoader = _
92+ private [ this ] var myMacroClassLoader : java.lang.ClassLoader = _
9393
9494 override def phaseName : String = " reifyQuotes"
9595
@@ -545,7 +545,7 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
545545 // Simplification of the call done in PostTyper for non-macros can also be performed now
546546 // see PostTyper `case Inlined(...) =>` for description of the simplification
547547 val call2 = Ident (call.symbol.topLevelClass.typeRef).withPos(call.pos)
548- val spliced = Splicer .splice(body, call, bindings, tree.pos, getMacroClassLoader ).withPos(tree.pos)
548+ val spliced = Splicer .splice(body, call, bindings, tree.pos, macroClassLoader ).withPos(tree.pos)
549549 transform(cpy.Inlined (tree)(call2, bindings, spliced))
550550 }
551551 else super .transform(tree)
@@ -623,12 +623,12 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
623623 transform(tp)
624624 }
625625
626- private def getMacroClassLoader (implicit ctx : Context ): ClassLoader = {
627- if (macroClassLoader == null ) {
626+ private def macroClassLoader (implicit ctx : Context ): ClassLoader = {
627+ if (myMacroClassLoader == null ) {
628628 val urls = ctx.settings.classpath.value.split(':' ).map(cp => java.nio.file.Paths .get(cp).toUri.toURL)
629- macroClassLoader = new java.net.URLClassLoader (urls, getClass.getClassLoader)
629+ myMacroClassLoader = new java.net.URLClassLoader (urls, getClass.getClassLoader)
630630 }
631- macroClassLoader
631+ myMacroClassLoader
632632 }
633633
634634 override protected def mayChange (sym : Symbol )(implicit ctx : Context ): Boolean = sym.is(Macro )
0 commit comments