Skip to content

Commit 50a8ca6

Browse files
committed
Fix missing compilation info
1 parent 9b8ab6e commit 50a8ca6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,11 @@ class TreeUnpickler(reader: TastyReader,
630630
rootd.symbol
631631
case _ =>
632632
val completer = adjustIfModule(new Completer(subReader(start, end)))
633-
if (isClass)
634-
newClassSymbol(ctx.owner, name.asTypeName, flags, completer, privateWithin, coord)
633+
if isClass then
634+
val compilationUnitInfo = completer match
635+
case completer: SymbolLoader => completer.compilationUnitInfo
636+
case _ => null
637+
newClassSymbol(ctx.owner, name.asTypeName, flags, completer, privateWithin, coord, compilationUnitInfo)
635638
else
636639
newSymbol(ctx.owner, name, flags, completer, privateWithin, coord)
637640
}

0 commit comments

Comments
 (0)