Skip to content

Commit 09af5e2

Browse files
committed
Drop localDummies again
With the cleaned-up local scope handling we don't need them anymore.
1 parent a2f672a commit 09af5e2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ class TreeUnpickler(reader: TastyReader, nameAtRef: NameRef => TermName, posUnpi
5555
*/
5656
private[this] var seenRoots: Set[Symbol] = Set()
5757

58-
/** A map from unpickled class symbols to their local dummies */
59-
private[this] val localDummies = new mutable.HashMap[ClassSymbol, Symbol]
60-
6158
/** The root owner tree. See `OwnerTree` class definition. Set by `enterTopLevel`. */
6259
private[this] var ownerTree: OwnerTree = _
6360

@@ -424,7 +421,7 @@ class TreeUnpickler(reader: TastyReader, nameAtRef: NameRef => TermName, posUnpi
424421
case VALDEF | DEFDEF | TYPEDEF | TYPEPARAM | PARAM =>
425422
createMemberSymbol()
426423
case TEMPLATE =>
427-
val localDummy = localDummies(ctx.owner.asClass)
424+
val localDummy = ctx.newLocalDummy(ctx.owner)
428425
registerSym(currentAddr, localDummy)
429426
localDummy
430427
case tag =>
@@ -478,7 +475,6 @@ class TreeUnpickler(reader: TastyReader, nameAtRef: NameRef => TermName, posUnpi
478475
}
479476
registerSym(start, sym)
480477
if (isClass) {
481-
localDummies(sym.asClass) = ctx.newLocalDummy(sym)
482478
sym.completer.withDecls(newScope)
483479
forkAt(templateStart).indexTemplateParams()(localContext(sym))
484480
}

0 commit comments

Comments
 (0)