From 98b50d2f52d1c0004e30ccf44914153aff8289a5 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 4 Apr 2011 16:34:02 +0000 Subject: Fixed crashes in IDE on default parameters in c... Fixed crashes in IDE on default parameters in constructors. --- src/compiler/scala/tools/nsc/typechecker/Namers.scala | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index cd845ab9e5..f7d8b0d887 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -1011,6 +1011,8 @@ trait Namers { self: Analyzer => if (!classAndNamerOfModule.contains(module)) return // fix #3649 (prevent crash in erroneous source code) val (cdef, nmr) = classAndNamerOfModule(module) + if (nmr == null) + return // can happen in IDE; this is really an ugly hack on top[ of an ugly hack but it seems to work! moduleNamer = Some(cdef, nmr) (cdef, nmr) } -- cgit v1.2.3