From 50a8ca65a239ef85fc8a13b86edf3866b8c5c741 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Mon, 27 Nov 2023 18:18:51 +0100 Subject: [PATCH] Fix missing compilation info --- .../src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) }