diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/ReflectMain.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ReflectMain.scala | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/ReflectMain.scala b/src/compiler/scala/tools/nsc/ReflectMain.scala index 7167f5aa27..f9a18abc25 100644 --- a/src/compiler/scala/tools/nsc/ReflectMain.scala +++ b/src/compiler/scala/tools/nsc/ReflectMain.scala @@ -1,7 +1,16 @@ package scala.tools.nsc +import util.ScalaClassLoader +import tools.util.PathResolver +import util.ClassPath.DefaultJavaContext + object ReflectMain extends Driver { - override def newCompiler(): Global = new ReflectGlobal(settings, reporter) + private def reflectionClassloaderFromSettings(settings: Settings) = { + val classpath = new PathResolver(settings).result + ScalaClassLoader.fromURLs(classpath.asURLs, getClass.getClassLoader) + } + + override def newCompiler(): Global = new ReflectGlobal(settings, reporter, reflectionClassloaderFromSettings(settings)) }
\ No newline at end of file |