diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-07-16 23:52:28 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-07-17 00:26:53 +0200 |
commit | 9117cbee2715ce184829a9f5b1b839240083d166 (patch) | |
tree | e7ed7104a26595808b9a8d5ff0d27925fc514974 /src | |
parent | 022eed3245db21f5faf06ae6472e585ead137f82 (diff) | |
download | scala-9117cbee2715ce184829a9f5b1b839240083d166.tar.gz scala-9117cbee2715ce184829a9f5b1b839240083d166.tar.bz2 scala-9117cbee2715ce184829a9f5b1b839240083d166.zip |
SI-6086 magic symbols strike back
Some of the symbols inside the compiler get created on the fly,
because there are no physical entities in classfiles corresponding to them.
This curious fact needs to be taken into account when loading symbols,
so that the magic symbols get correctly loaded by reflective mirrors.
magicSymbols (as defined in Definitions.scala) include not only
top-level classes, but some other stuff (e.g. String_+ or methods on Any).
Hence a filtering was done to exclude the stuff that's irrelevant
to reflective symbol loading.
Unfortunately a filter was configured to accept only _.isClass,
which consequently ruled out scala.AnyRef (that is a type alias).
Diffstat (limited to 'src')
-rw-r--r-- | src/reflect/scala/reflect/runtime/JavaMirrors.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/runtime/JavaMirrors.scala b/src/reflect/scala/reflect/runtime/JavaMirrors.scala index 185621efa4..75d43a7553 100644 --- a/src/reflect/scala/reflect/runtime/JavaMirrors.scala +++ b/src/reflect/scala/reflect/runtime/JavaMirrors.scala @@ -1001,7 +1001,7 @@ trait JavaMirrors extends internal.SymbolTable with api.JavaUniverse { self: Sym private lazy val magicSymbols: Map[(String, Name), Symbol] = { def mapEntry(sym: Symbol): ((String, Name), Symbol) = (sym.owner.fullName, sym.name) -> sym - Map() ++ (definitions.magicSymbols filter (_.isClass) map mapEntry) + Map() ++ (definitions.magicSymbols filter (_.isType) map mapEntry) } /** 1. If `owner` is a package class (but not the empty package) and `name` is a term name, make a new package |