From ba975223e8854db866a55f7207ad889327c4100d Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Fri, 9 Jul 2010 09:51:03 +0000 Subject: close #3649. no review --- src/compiler/scala/tools/nsc/typechecker/Namers.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 53fb15dbeb..756863f8f9 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -990,6 +990,8 @@ trait Namers { self: Analyzer => val module = companionModuleOf(meth.owner, context) module.initialize // call type completer (typedTemplate), adds the // module's templateNamer to classAndNamerOfModule + if (!classAndNamerOfModule.contains(module)) + return // fix #3649 (prevent crash in erroneous source code) val (cdef, nmr) = classAndNamerOfModule(module) moduleNamer = Some(cdef, nmr) (cdef, nmr) -- cgit v1.2.3