diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala index 4b80768e1322..de13f0eac96a 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala @@ -630,8 +630,11 @@ class TreeUnpickler(reader: TastyReader, rootd.symbol case _ => val completer = adjustIfModule(new Completer(subReader(start, end))) - if (isClass) - newClassSymbol(ctx.owner, name.asTypeName, flags, completer, privateWithin, coord) + if isClass then + val compilationUnitInfo = completer match + case completer: SymbolLoader => completer.compilationUnitInfo + case _ => null + newClassSymbol(ctx.owner, name.asTypeName, flags, completer, privateWithin, coord, compilationUnitInfo) else newSymbol(ctx.owner, name, flags, completer, privateWithin, coord) }