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

scala.reflect.macros.runtime.Names.scala Maven / Gradle / Ivy

There is a newer version: 2.11.2
Show newest version
package scala.reflect.macros
package runtime

trait Names {
  self: Context =>

  lazy val freshNameCreator = callsiteTyper.context.unit.fresh

  def fresh(): String =
    freshNameCreator.newName()

  def fresh(name: String): String =
    freshNameCreator.newName(name)

  def fresh[NameType <: Name](name: NameType): NameType =
    name.mapName(freshNameCreator.newName(_)).asInstanceOf[NameType]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy