diff options
author | Seth Tisue <seth@tisue.net> | 2015-09-08 13:23:22 -0400 |
---|---|---|
committer | Seth Tisue <seth@tisue.net> | 2015-09-08 13:23:22 -0400 |
commit | ad17b552b8f7c3a435ad8de71cd7268f905a1b8d (patch) | |
tree | fc4093f85c79cb9dc6bfb77a62128652f32a68ec /src/compiler/scala/tools/nsc/typechecker/Macros.scala | |
parent | 468abc47999a39801f9e8672900fea797dea6611 (diff) | |
download | scala-ad17b552b8f7c3a435ad8de71cd7268f905a1b8d.tar.gz scala-ad17b552b8f7c3a435ad8de71cd7268f905a1b8d.tar.bz2 scala-ad17b552b8f7c3a435ad8de71cd7268f905a1b8d.zip |
Merge remote-tracking branch 'origin/2.11.x' into 2.12.x
only trivial merge conflicts here.
not dealing with PR #4333 in this merge because there is a substantial
conflict there -- so that's why I stopped at
63daba33ae99471175e9d7b20792324615f5999b for now
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Macros.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Macros.scala | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Macros.scala b/src/compiler/scala/tools/nsc/typechecker/Macros.scala index 99dd81c7e2..3ed128cbc5 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Macros.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Macros.scala @@ -55,6 +55,13 @@ trait Macros extends MacroRuntimes with Traces with Helpers { def globalSettings = global.settings + /** Obtains a `ClassLoader` instance used for macro expansion. + * + * By default a new `ScalaClassLoader` is created using the classpath + * from global and the classloader of self as parent. + * + * Mirrors with runtime definitions (e.g. Repl) need to adjust this method. + */ protected def findMacroClassLoader(): ClassLoader = { val classpath = global.classPath.asURLs macroLogVerbose("macro classloader: initializing from -cp: %s".format(classpath)) @@ -658,7 +665,7 @@ trait Macros extends MacroRuntimes with Traces with Helpers { // // Situation #2 requires measures to be taken. If we're in it, then noone's going to help us infer // the undetermined type params. Therefore we need to do something ourselves or otherwise this - // expandee will forever remaing not expanded (see SI-5692). A traditional way out of this conundrum + // expandee will forever remain not expanded (see SI-5692). A traditional way out of this conundrum // is to call `instantiate` and let the inferencer try to find the way out. It works for simple cases, // but sometimes, if the inferencer lacks information, it will be forced to approximate. // |