Skip to content

Commit c43448e

Browse files
committed
Don't try to unpickle RHS of deferred inline methods
1 parent b757533 commit c43448e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ object SymDenotations {
939939
isAllOf(InlineMethod, butNot = Accessor)
940940

941941
def isInlineRetained: Ctx[Boolean] =
942-
allOverriddenSymbols.exists(!_.is(Inline))
942+
!is(Deferred) && allOverriddenSymbols.exists(!_.is(Inline))
943943

944944
/** Is this a Scala 2 macro */
945945
final def isScala2Macro(implicit ctx: Context): Boolean = is(Macro) && symbol.owner.is(Scala2x)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ class TreeUnpickler(reader: TastyReader,
580580
sym.completer.withDecls(newScope)
581581
forkAt(templateStart).indexTemplateParams()(localContext(sym))
582582
}
583-
else if (sym.isInlineMethod)
583+
else if sym.isInlineMethod && !sym.is(Deferred) then
584584
sym.addAnnotation(LazyBodyAnnotation { ctx0 =>
585585
val ctx1 = localContext(sym)(ctx0).addMode(Mode.ReadPositions)
586586
given Context = sourceChangeContext(Addr(0))(ctx1)

0 commit comments

Comments
 (0)