All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dotty.tools.dotc.core.ConstraintRunInfo.scala Maven / Gradle / Ivy

package dotty.tools.dotc
package core

import Contexts._
import config.Printers.typr

trait ConstraintRunInfo { self: Run =>
  private[this] var maxSize = 0
  private[this] var maxConstraint: Constraint = _
  def recordConstraintSize(c: Constraint, size: Int) =
    if (size > maxSize) {
      maxSize = size
      maxConstraint = c
    }
  def printMaxConstraint()(implicit ctx: Context) =
    if (maxSize > 0) typr.println(s"max constraint = ${maxConstraint.show}")

  protected def reset() = maxConstraint = null
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy