aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-01-30 17:53:54 +1100
committerMartin Odersky <odersky@gmail.com>2017-02-08 19:35:58 +1100
commitbc06d17ebfd7c8d6003dffe925c3cf9ebca6b1b9 (patch)
treea40ab611b1f005aef68d869914b353ae10441347 /compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala
parent269be04ce9f42d57dbc9ceb24afbae1b615e64e4 (diff)
downloaddotty-bc06d17ebfd7c8d6003dffe925c3cf9ebca6b1b9.tar.gz
dotty-bc06d17ebfd7c8d6003dffe925c3cf9ebca6b1b9.tar.bz2
dotty-bc06d17ebfd7c8d6003dffe925c3cf9ebca6b1b9.zip
Print typerstate nesting info as part of constr printing
When printing info about adding to constraints, show the hashes of the typerstate stack, so that we know where constraints are added.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala b/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala
index 42df53fed..3aa20f15b 100644
--- a/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala
+++ b/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala
@@ -79,12 +79,12 @@ trait ConstraintHandling {
if (Config.failOnInstantiationToNothing) assert(false, msg)
else ctx.log(msg)
}
- constr.println(i"adding $description")
+ constr.println(i"adding $description in ${ctx.typerState.hashesStr}")
val lower = constraint.lower(param)
val res =
addOneBound(param, bound, isUpper = true) &&
lower.forall(addOneBound(_, bound, isUpper = true))
- constr.println(i"added $description = $res")
+ constr.println(i"added $description = $res in ${ctx.typerState.hashesStr}")
res
}
@@ -95,7 +95,7 @@ trait ConstraintHandling {
val res =
addOneBound(param, bound, isUpper = false) &&
upper.forall(addOneBound(_, bound, isUpper = false))
- constr.println(i"added $description = $res")
+ constr.println(i"added $description = $res in ${ctx.typerState.hashesStr}")
res
}
@@ -108,12 +108,12 @@ trait ConstraintHandling {
val up2 = p2 :: constraint.exclusiveUpper(p2, p1)
val lo1 = constraint.nonParamBounds(p1).lo
val hi2 = constraint.nonParamBounds(p2).hi
- constr.println(i"adding $description down1 = $down1, up2 = $up2")
+ constr.println(i"adding $description down1 = $down1, up2 = $up2 ${ctx.typerState.hashesStr}")
constraint = constraint.addLess(p1, p2)
down1.forall(addOneBound(_, hi2, isUpper = true)) &&
up2.forall(addOneBound(_, lo1, isUpper = false))
}
- constr.println(i"added $description = $res")
+ constr.println(i"added $description = $res ${ctx.typerState.hashesStr}")
res
}