From 18cf5d280e3f63213fd6bddbe8e1ed5b5d40b595 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Mon, 3 Mar 2014 17:23:15 +0100 Subject: More informative asserts. --- src/dotty/tools/dotc/core/Denotations.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/dotty/tools/dotc/core/Denotations.scala') diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 06ab17a52..9c8de3829 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -466,7 +466,7 @@ object Denotations { */ private def bringForward()(implicit ctx: Context): SingleDenotation = this match { case denot: SymDenotation if ctx.stillValid(denot) => - if (denot.exists) assert(ctx.runId > validFor.runId) + if (denot.exists) assert(ctx.runId > validFor.runId, 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) @@ -527,7 +527,7 @@ object Denotations { while (!(cur.validFor contains currentPeriod)) { cur = cur.nextInRun cnt += 1 - assert(cnt <= MaxPossiblePhaseId) + assert(cnt <= MaxPossiblePhaseId, "seems to be a loop in Denotations") } } cur @@ -704,7 +704,7 @@ object Denotations { } case class DenotUnion(denots1: PreDenotation, denots2: PreDenotation) extends PreDenotation { - assert(denots1.exists && denots2.exists) + assert(denots1.exists && denots2.exists, s"Union of non-existing denotations ($denots1) and ($denots2)") def exists = true def first = denots1.first def toDenot(pre: Type)(implicit ctx: Context) = -- cgit v1.2.3