diff options
author | Paul Phillips <paulp@improving.org> | 2012-10-31 14:08:29 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-10-31 15:42:14 -0700 |
commit | 1e2328ea6a8b592b5a2abe3557dc633e96f688f2 (patch) | |
tree | 9df1a526619025705833eb8a5ca1393c9dfeba5f /src/compiler | |
parent | 290220bc6f5e1a11e38c67eb3e51ec617f96a1f6 (diff) | |
download | scala-1e2328ea6a8b592b5a2abe3557dc633e96f688f2.tar.gz scala-1e2328ea6a8b592b5a2abe3557dc633e96f688f2.tar.bz2 scala-1e2328ea6a8b592b5a2abe3557dc633e96f688f2.zip |
Fix for SI-6597, implicit case class crasher.
It seems to me like every call to scope.lookup in the
compiler is a latent bug. If a symbol is overloaded, you
get one at random. (See the FIXME comment in f5c336d5660
for more on this.)
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 9e9a22d4d1..e1afe153ad 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -398,7 +398,7 @@ trait Namers extends MethodSynthesis { * a module definition or a class definition. */ def enterModuleSymbol(tree : ModuleDef): Symbol = { - var m: Symbol = context.scope.lookup(tree.name) + var m: Symbol = context.scope lookupAll tree.name find (_.isModule) getOrElse NoSymbol val moduleFlags = tree.mods.flags | MODULE if (m.isModule && !m.isPackage && inCurrentScope(m) && (currentRun.canRedefine(m) || m.isSynthetic)) { updatePosFlags(m, tree.pos, moduleFlags) |