Skip to content

Commit c94c58e

Browse files
committed
TreeUnpickler: pass Context implicitly when possible
We could use a context function but for now let's avoid using Scala 3 features in the tasty code to make it easier to port to Scala 2.
1 parent d596f0b commit c94c58e

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
@@ -670,7 +670,7 @@ class TreeUnpickler(reader: TastyReader,
670670
readByte()
671671
val end = readEnd()
672672
val tp = readType()
673-
val lazyAnnotTree = readLaterWithOwner(end, rdr => ctx => rdr.readTerm()(ctx))
673+
val lazyAnnotTree = readLaterWithOwner(end, rdr => implicit ctx => rdr.readTerm())
674674

675675
owner =>
676676
Annotation.deferredSymAndTree(tp.typeSymbol)(lazyAnnotTree(owner).complete)
@@ -780,7 +780,7 @@ class TreeUnpickler(reader: TastyReader,
780780
def complete(implicit ctx: Context) = typer.Inliner.bodyToInline(sym)
781781
}
782782
else
783-
readLater(end, rdr => ctx => rdr.readTerm()(ctx))
783+
readLater(end, rdr => implicit ctx => rdr.readTerm())
784784

785785
def ValDef(tpt: Tree) =
786786
ta.assignType(untpd.ValDef(sym.name.asTermName, tpt, readRhs(localCtx)), sym)

0 commit comments

Comments
 (0)