diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-02-27 15:22:50 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-02-27 15:22:50 -0800 |
commit | 65a5459b0c3ae7daa16a283733ff0070f3ef21ab (patch) | |
tree | c0f1e90291f282a46a4e898d725f6f8d9eb497af /src/compiler/scala/tools/nsc/typechecker/Namers.scala | |
parent | 4265ee8f3846262c778c0e1e6184b3a23f18ec2a (diff) | |
parent | 234d05d52b5a2985e53f9cb6877001b3c8fc780e (diff) | |
download | scala-65a5459b0c3ae7daa16a283733ff0070f3ef21ab.tar.gz scala-65a5459b0c3ae7daa16a283733ff0070f3ef21ab.tar.bz2 scala-65a5459b0c3ae7daa16a283733ff0070f3ef21ab.zip |
Merge branch 2.10.1 into master
Conflicts:
src/compiler/scala/tools/nsc/ast/Trees.scala
src/library/scala/concurrent/impl/ExecutionContextImpl.scala
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 77b0749c20..3c5e484105 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -929,6 +929,7 @@ trait Namers extends MethodSynthesis { // to use. clazz is the ModuleClass. sourceModule works also for classes defined in methods. val module = clazz.sourceModule for (cda <- module.attachments.get[ConstructorDefaultsAttachment]) { + debuglog(s"Storing the template namer in the ConstructorDefaultsAttachment of ${module.debugLocationString}.") cda.companionModuleClassNamer = templateNamer } val classTp = ClassInfoType(parents, decls, clazz) @@ -1250,8 +1251,11 @@ trait Namers extends MethodSynthesis { // module's templateNamer to classAndNamerOfModule module.attachments.get[ConstructorDefaultsAttachment] match { // by martin: the null case can happen in IDE; this is really an ugly hack on top of an ugly hack but it seems to work - // later by lukas: disabled when fixing SI-5975, i think it cannot happen anymore - case Some(cda) /*if cma.companionModuleClassNamer == null*/ => + case Some(cda) => + if (cda.companionModuleClassNamer == null) { + debugwarn(s"SI-6576 The companion module namer for $meth was unexpectedly null") + return + } val p = (cda.classWithDefault, cda.companionModuleClassNamer) moduleNamer = Some(p) p |