Skip to content

Commit bf4d3b0

Browse files
committed
Retract InSuperCall mode when unpickling the right-hand sides of definitions
This was done by accident before, because we did not keep the mode bits of the context calling a readLater.
1 parent 609acf3 commit bf4d3b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ class TreeUnpickler(reader: TastyReader,
707707

708708
def readRhs(implicit ctx: Context) =
709709
if (noRhs(end)) EmptyTree
710-
else readLater(end, rdr => ctx => rdr.readTerm()(ctx))
710+
else readLater(end, rdr => ctx => rdr.readTerm()(ctx.retractMode(Mode.InSuperCall)))
711711

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

0 commit comments

Comments
 (0)