diff options
author | Sean McDirmid <sean.mcdirmid@gmail.com> | 2008-04-19 11:41:05 +0000 |
---|---|---|
committer | Sean McDirmid <sean.mcdirmid@gmail.com> | 2008-04-19 11:41:05 +0000 |
commit | 5fbb8b6f9a1f225da9f55363df877529276519c6 (patch) | |
tree | 958753e4435ed99884c4373396e6707b6a59fda8 /src | |
parent | 324bc18be0ef5f4d420b0591eeae70898e30bd02 (diff) | |
download | scala-5fbb8b6f9a1f225da9f55363df877529276519c6.tar.gz scala-5fbb8b6f9a1f225da9f55363df877529276519c6.tar.bz2 scala-5fbb8b6f9a1f225da9f55363df877529276519c6.zip |
Deprecated non-position versions of newName, ad...
Deprecated non-position versions of newName, added explaining comment.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/util/FreshNameCreator.scala | 6 |
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 |