@@ -89,7 +89,7 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
89
89
import ast .tpd ._
90
90
91
91
/** Classloader used for loading macros */
92
- private var macroClassLoader : java.lang.ClassLoader = _
92
+ private [ this ] var myMacroClassLoader : java.lang.ClassLoader = _
93
93
94
94
override def phaseName : String = " reifyQuotes"
95
95
@@ -545,7 +545,7 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
545
545
// Simplification of the call done in PostTyper for non-macros can also be performed now
546
546
// see PostTyper `case Inlined(...) =>` for description of the simplification
547
547
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)
549
549
transform(cpy.Inlined (tree)(call2, bindings, spliced))
550
550
}
551
551
else super .transform(tree)
@@ -623,12 +623,12 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
623
623
transform(tp)
624
624
}
625
625
626
- private def getMacroClassLoader (implicit ctx : Context ): ClassLoader = {
627
- if (macroClassLoader == null ) {
626
+ private def macroClassLoader (implicit ctx : Context ): ClassLoader = {
627
+ if (myMacroClassLoader == null ) {
628
628
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)
630
630
}
631
- macroClassLoader
631
+ myMacroClassLoader
632
632
}
633
633
634
634
override protected def mayChange (sym : Symbol )(implicit ctx : Context ): Boolean = sym.is(Macro )
0 commit comments