File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/compiler/scala/tools/nsc/typechecker Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -908,6 +908,7 @@ trait Namers extends MethodSynthesis {
908
908
// to use. clazz is the ModuleClass. sourceModule works also for classes defined in methods.
909
909
val module = clazz.sourceModule
910
910
for (cda <- module.attachments.get[ConstructorDefaultsAttachment ]) {
911
+ debuglog(s " Storing the template namer in the ConstructorDefaultsAttachment of ${module.debugLocationString}. " )
911
912
cda.companionModuleClassNamer = templateNamer
912
913
}
913
914
val classTp = ClassInfoType (parents, decls, clazz)
@@ -1229,8 +1230,11 @@ trait Namers extends MethodSynthesis {
1229
1230
// module's templateNamer to classAndNamerOfModule
1230
1231
module.attachments.get[ConstructorDefaultsAttachment ] match {
1231
1232
// 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
1232
- // later by lukas: disabled when fixing SI-5975, i think it cannot happen anymore
1233
- case Some (cda) /* if cma.companionModuleClassNamer == null*/ =>
1233
+ case Some (cda) =>
1234
+ if (cda.companionModuleClassNamer == null ) {
1235
+ debugwarn(s " SI-6576 The companion module namer for $meth was unexpectedly null " )
1236
+ return
1237
+ }
1234
1238
val p = (cda.classWithDefault, cda.companionModuleClassNamer)
1235
1239
moduleNamer = Some (p)
1236
1240
p
You can’t perform that action at this time.
0 commit comments