Skip to content

Commit aa5ece3

Browse files
committed
Make -Ytest-pickler compatible with -Ycheck:all
1 parent bbea62e commit aa5ece3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/src/dotty/tools/dotc/transform/TreeChecker.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ class TreeChecker extends Phase with SymTransformer {
9797
def phaseName: String = "Ycheck"
9898

9999
def run(implicit ctx: Context): Unit = {
100-
check(ctx.allPhases, ctx)
100+
if (ctx.settings.YtestPickler.value && ctx.phase.prev.isInstanceOf[Pickler])
101+
ctx.echo("Skipping Ycheck after pickling with -Ytest-pickler, the returned tree contains stale symbols")
102+
else
103+
check(ctx.allPhases, ctx)
101104
}
102105

103106
private def previousPhases(phases: List[Phase])(implicit ctx: Context): List[Phase] = phases match {

0 commit comments

Comments
 (0)