Skip to content

Commit d0a8606

Browse files
committed
When unpickling, enter only class members into enclosing scope.
1 parent 81116ea commit d0a8606

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,10 @@ class TreeUnpickler(reader: TastyReader, nameAtRef: NameRef => TermName, posUnpi
478478
ctx.newSymbol(ctx.owner, name, flags, completer, privateWithin, coord)
479479
}
480480
sym.annotations = annots
481-
ctx.enter(sym)
481+
ctx.owner match {
482+
case cls: ClassSymbol => cls.enter(sym)
483+
case _ =>
484+
}
482485
registerSym(start, sym)
483486
if (isClass) {
484487
localDummies(sym.asClass) = ctx.newLocalDummy(sym)

0 commit comments

Comments
 (0)