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 =>
491
491
if (cdef.isClassDef) {
492
492
classDef(name) = cdef
493
493
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 =>
495
496
moduleDef(name) = mcls
496
497
case _ =>
497
498
}
@@ -505,7 +506,8 @@ class Namer { typer: Typer =>
505
506
classDef get name.toTypeName match {
506
507
case Some (cdef) =>
507
508
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 =>
509
511
val mcls1 = cpy.TypeDef (mcls)(
510
512
rhs = cpy.Template (impl)(body = compimpl.body ++ impl.body))
511
513
mdef.putAttachment(ExpandedTree , Thicket (vdef :: mcls1 :: rest))
You can’t perform that action at this time.
0 commit comments