diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-07-06 21:13:44 +0400 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-07-06 22:30:17 +0400 |
commit | a3fe989833cc482dbae04a2e2f822a74cad67a36 (patch) | |
tree | dc81f754896bff47e924a6d434c1df9c292af4b3 /src/compiler | |
parent | c39c7276c38f9ef66fd7054609ef33627efe5177 (diff) | |
download | scala-a3fe989833cc482dbae04a2e2f822a74cad67a36.tar.gz scala-a3fe989833cc482dbae04a2e2f822a74cad67a36.tar.bz2 scala-a3fe989833cc482dbae04a2e2f822a74cad67a36.zip |
SI-6036 yet again makes sense of magic symbols
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/reflect/makro/runtime/Mirrors.scala | 9 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/compiler/scala/reflect/makro/runtime/Mirrors.scala b/src/compiler/scala/reflect/makro/runtime/Mirrors.scala index 79fa07fdb4..ec970ee696 100644 --- a/src/compiler/scala/reflect/makro/runtime/Mirrors.scala +++ b/src/compiler/scala/reflect/makro/runtime/Mirrors.scala @@ -24,11 +24,14 @@ trait Mirrors { else NoSymbol } + private lazy val libraryClasspathLoader: ClassLoader = { + val classpath = platform.classPath.asURLs + ScalaClassLoader.fromURLs(classpath) + } + private def isJavaClass(path: String): Boolean = try { - val classpath = platform.classPath.asURLs - var classLoader = ScalaClassLoader.fromURLs(classpath) - Class.forName(path, true, classLoader) + Class.forName(path, true, libraryClasspathLoader) true } catch { case (_: ClassNotFoundException) | (_: NoClassDefFoundError) | (_: IncompatibleClassChangeError) => diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 018daf4568..42672c1d3b 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -4431,7 +4431,7 @@ trait Typers extends Modes with Adaptations with Tags { if (!qual.tpe.widen.isErroneous) { if ((mode & QUALmode) != 0) { - val lastTry = missingHook(qual.tpe.typeSymbol, name) + val lastTry = rootMirror.missingHook(qual.tpe.typeSymbol, name) if (lastTry != NoSymbol) return typed1(tree setSymbol lastTry, mode, pt) } NotAMemberError(tree, qual, name) @@ -4650,7 +4650,7 @@ trait Typers extends Modes with Adaptations with Tags { log("Allowing empty package member " + name + " due to settings.") else { if ((mode & QUALmode) != 0) { - val lastTry = missingHook(rootMirror.RootClass, name) + val lastTry = rootMirror.missingHook(rootMirror.RootClass, name) if (lastTry != NoSymbol) return typed1(tree setSymbol lastTry, mode, pt) } if (settings.debug.value) { |