From b9d018e7af67428c7fff74ae5ed0c55af9f621ff Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 19 Jan 2015 12:49:57 +0100 Subject: Make checkPropagated configurable Only run if a config option is set. --- src/dotty/tools/dotc/core/ConstraintHandling.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/core/ConstraintHandling.scala') diff --git a/src/dotty/tools/dotc/core/ConstraintHandling.scala b/src/dotty/tools/dotc/core/ConstraintHandling.scala index e79dc28b9..28a0c87a2 100644 --- a/src/dotty/tools/dotc/core/ConstraintHandling.scala +++ b/src/dotty/tools/dotc/core/ConstraintHandling.scala @@ -236,7 +236,7 @@ trait ConstraintHandling { */ protected def addConstraint(param: PolyParam, bound: Type, fromBelow: Boolean): Boolean = { def description = i"constr $param ${if (fromBelow) ">:" else "<:"} $bound:\n$constraint" - checkPropagated(s"adding $description")(true) + //checkPropagated(s"adding $description")(true) // DEBUG in case following fails checkPropagated(s"added $description") { addConstraintInvocations += 1 try bound match { @@ -250,7 +250,7 @@ trait ConstraintHandling { } def checkPropagated(msg: => String)(result: Boolean): Boolean = { - if (result && addConstraintInvocations == 0) { + if (Config.checkConstraintsPropagated && result && addConstraintInvocations == 0) { frozenConstraint = true for (p <- constraint.domainParams) { for (u <- constraint.upper(p)) -- cgit v1.2.3