aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Denotations.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <darkdimius@gmail.com>2014-03-04 00:15:44 +0100
committerDmitry Petrashko <darkdimius@gmail.com>2014-03-04 00:15:44 +0100
commit340ec6150b205287e1c0f5a0422d2186c29bc086 (patch)
treef2c7b46d707fd3dce11f21e8685bf8b5ddc6da4d /src/dotty/tools/dotc/core/Denotations.scala
parent356dd4b16456a478ce3c0d0a918f2e820bdd154c (diff)
parent2b4e7659237fe0e6eb5425ebe50ceab79af49816 (diff)
downloaddotty-340ec6150b205287e1c0f5a0422d2186c29bc086.tar.gz
dotty-340ec6150b205287e1c0f5a0422d2186c29bc086.tar.bz2
dotty-340ec6150b205287e1c0f5a0422d2186c29bc086.zip
Merge pull request #37 from DarkDimius/assertions
Typos, better assertions, dead code
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/Denotations.scala6
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) =