File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,13 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
9090
9191 /** Classloader used for loading macros */
9292 private [this ] var myMacroClassLoader : java.lang.ClassLoader = _
93+ private def macroClassLoader (implicit ctx : Context ): ClassLoader = {
94+ if (myMacroClassLoader == null ) {
95+ val urls = ctx.settings.classpath.value.split(':' ).map(cp => java.nio.file.Paths .get(cp).toUri.toURL)
96+ myMacroClassLoader = new java.net.URLClassLoader (urls, getClass.getClassLoader)
97+ }
98+ myMacroClassLoader
99+ }
93100
94101 override def phaseName : String = " reifyQuotes"
95102
@@ -623,14 +630,6 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
623630 transform(tp)
624631 }
625632
626- private def macroClassLoader (implicit ctx : Context ): ClassLoader = {
627- if (myMacroClassLoader == null ) {
628- val urls = ctx.settings.classpath.value.split(':' ).map(cp => java.nio.file.Paths .get(cp).toUri.toURL)
629- myMacroClassLoader = new java.net.URLClassLoader (urls, getClass.getClassLoader)
630- }
631- myMacroClassLoader
632- }
633-
634633 override protected def mayChange (sym : Symbol )(implicit ctx : Context ): Boolean = sym.is(Macro )
635634
636635 /** Returns the type of the compiled macro as a lambda: Seq[Any] => Object */
You can’t perform that action at this time.
0 commit comments