File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -491,7 +491,8 @@ class Namer { typer: Typer =>
491491 if (cdef.isClassDef) {
492492 classDef(name) = cdef
493493 cdef.attachmentOrElse(ExpandedTree , cdef) match {
494- case Thicket (cls :: mval :: (mcls @ TypeDef (_, _ : Template )) :: crest) =>
494+ case Thicket (cls :: mval :: (mcls @ TypeDef (mname, _ : Template )) :: crest)
495+ if name.moduleClassName == mname =>
495496 moduleDef(name) = mcls
496497 case _ =>
497498 }
@@ -505,7 +506,8 @@ class Namer { typer: Typer =>
505506 classDef get name.toTypeName match {
506507 case Some (cdef) =>
507508 cdef.attachmentOrElse(ExpandedTree , cdef) match {
508- case Thicket (cls :: mval :: TypeDef (_, compimpl : Template ) :: crest) =>
509+ case Thicket (cls :: mval :: TypeDef (mname, compimpl : Template ) :: crest)
510+ if name.moduleClassName == mname =>
509511 val mcls1 = cpy.TypeDef (mcls)(
510512 rhs = cpy.Template (impl)(body = compimpl.body ++ impl.body))
511513 mdef.putAttachment(ExpandedTree , Thicket (vdef :: mcls1 :: rest))
You can’t perform that action at this time.
0 commit comments