Skip to content

Commit b885a2f

Browse files
Fix unpickling of dependent method body annots
1 parent 64cb141 commit b885a2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ class TreeUnpickler(reader: TastyReader,
583583
sym.completer.withDecls(newScope)
584584
forkAt(templateStart).indexTemplateParams()(localContext(sym))
585585
}
586-
else if (sym.isInlineMethod)
586+
else if (sym.isInlineMethod | sym.isDependentMethod)
587587
sym.addAnnotation(LazyBodyAnnotation { ctx0 =>
588588
implicit val ctx: Context = localContext(sym)(ctx0).addMode(Mode.ReadPositions)
589589
// avoids space leaks by not capturing the current context
@@ -773,7 +773,7 @@ class TreeUnpickler(reader: TastyReader,
773773
def readRhs(implicit ctx: Context) =
774774
if (nothingButMods(end))
775775
EmptyTree
776-
else if (sym.isInlineMethod)
776+
else if (sym.isInlineMethod | sym.isDependentMethod)
777777
// The body of an inline method is stored in an annotation, so no need to unpickle it again
778778
new Trees.Lazy[Tree] {
779779
def complete(implicit ctx: Context) = typer.Inliner.bodyToInline(sym)

0 commit comments

Comments
 (0)