diff options
author | Martin Odersky <odersky@gmail.com> | 2016-06-29 20:22:14 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-11 13:35:06 +0200 |
commit | a23c1a476296a25566d7aa08de676a1217b243cb (patch) | |
tree | 06b9cc95d245ec72b129cbd273d1012ab9a9b61c /src/dotty/tools/dotc/core/Denotations.scala | |
parent | 9d9965c35c4387669776f94a64fcb08fd8bf9dcf (diff) | |
download | dotty-a23c1a476296a25566d7aa08de676a1217b243cb.tar.gz dotty-a23c1a476296a25566d7aa08de676a1217b243cb.tar.bz2 dotty-a23c1a476296a25566d7aa08de676a1217b243cb.zip |
Fixes for printing under -Ytest-pickler
- Make printing package ids more robost
Crashed before when printers were turned on during test pickling mode.
- Make Denotation#bringForward more robost
Assertion failed before when printers were turned on during test pickling mode.
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 494df7547..09971d1d1 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -601,7 +601,8 @@ object Denotations { */ private def bringForward()(implicit ctx: Context): SingleDenotation = this match { case denot: SymDenotation if ctx.stillValid(denot) => - assert(ctx.runId > validFor.runId, s"denotation $denot invalid in run ${ctx.runId}. ValidFor: $validFor") + assert(ctx.runId > validFor.runId || ctx.settings.YtestPickler.value, // mixing test pickler with debug printing can travel back in time + s"denotation $denot invalid in run ${ctx.runId}. ValidFor: $validFor") var d: SingleDenotation = denot do { d.validFor = Period(ctx.period.runId, d.validFor.firstPhaseId, d.validFor.lastPhaseId) |