summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/util/FreshNameCreator.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/util/FreshNameCreator.scala b/src/compiler/scala/tools/nsc/util/FreshNameCreator.scala
index be737dce52..36a5c4e1ac 100644
--- a/src/compiler/scala/tools/nsc/util/FreshNameCreator.scala
+++ b/src/compiler/scala/tools/nsc/util/FreshNameCreator.scala
@@ -9,9 +9,12 @@ package scala.tools.nsc.util
import scala.collection.mutable.HashMap
trait FreshNameCreator {
+ /** do not call before after type checking ends. Use newName(Position,String) instead. */
@deprecated def newName(prefix : String) : String
- def newName() : String
+ /** do not call before after type checking ends. Use newName(Position) instead. */
+ @deprecated def newName() : String
def newName(pos : util.Position, prefix : String) : String
+ def newName(pos : util.Position) : String
}
object FreshNameCreator {
class Default extends FreshNameCreator {
@@ -31,6 +34,7 @@ object FreshNameCreator {
safePrefix + count
}
def newName(pos : util.Position, prefix : String) = newName(prefix)
+ def newName(pos : util.Position) = newName()
def newName(): String = {
counter = counter + 1