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

scala.scalanative.nir.Positioned.scala Maven / Gradle / Ivy

The newest version!
package scala.scalanative.nir

trait Positioned {

  /** Returns the site in the program sources corresponding to the definition.
   */
  def pos: SourcePosition

  if (Positioned.debugEmptyPositions && pos.isEmpty) {
    System.err.println(s"\nFound empty position in $this, backtrace:")
    new RuntimeException()
      .getStackTrace()
      .take(10)
      .foreach(println)
  }
}

object Positioned {
  private final val debugEmptyPositions =
    sys.props.contains("scalanative.debug.nir.positions")
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy