diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-03-03 17:23:15 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-03-03 17:23:15 +0100 |
commit | 18cf5d280e3f63213fd6bddbe8e1ed5b5d40b595 (patch) | |
tree | 29ba57c7469eb5b53eb1159238ef2778d58db76b /src/dotty/tools/dotc/core/Denotations.scala | |
parent | 92a4fefe58cfe4c1bcccc8f98183079a553d477a (diff) | |
download | dotty-18cf5d280e3f63213fd6bddbe8e1ed5b5d40b595.tar.gz dotty-18cf5d280e3f63213fd6bddbe8e1ed5b5d40b595.tar.bz2 dotty-18cf5d280e3f63213fd6bddbe8e1ed5b5d40b595.zip |
More informative asserts.
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 6 |
1 files changed, 3 insertions, 3 deletions
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) = |