diff options
author | Martin Odersky <odersky@gmail.com> | 2013-05-30 10:09:48 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-05-30 10:09:48 +0200 |
commit | 17d0e7008f62882c10193ea0db09c9b90736c320 (patch) | |
tree | 44cf4d4f2675effabb2ba651f9399d7d6fce21a1 /src/dotty/tools/dotc/util | |
parent | c53ac49cbe7c98c05a99fea3c8e1dcad75275a82 (diff) | |
download | dotty-17d0e7008f62882c10193ea0db09c9b90736c320.tar.gz dotty-17d0e7008f62882c10193ea0db09c9b90736c320.tar.bz2 dotty-17d0e7008f62882c10193ea0db09c9b90736c320.zip |
wip, because I have to get off this machine.
Diffstat (limited to 'src/dotty/tools/dotc/util')
-rw-r--r-- | src/dotty/tools/dotc/util/FreshNameCreator.scala | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/util/FreshNameCreator.scala b/src/dotty/tools/dotc/util/FreshNameCreator.scala index cc39008ed..ff9f68290 100644 --- a/src/dotty/tools/dotc/util/FreshNameCreator.scala +++ b/src/dotty/tools/dotc/util/FreshNameCreator.scala @@ -5,8 +5,7 @@ package util import scala.collection.mutable trait FreshNameCreator { - def newName(): String - def newName(prefix: String): String + def newName(prefix: String = ""): String @deprecated("use newName(prefix)", "2.9.0") def newName(pos: scala.reflect.internal.util.Position, prefix: String): String = newName(prefix) @@ -24,7 +23,7 @@ object FreshNameCreator { * that the returned name has never been returned by a previous * call to this function (provided the prefix does not end in a digit). */ - def newName(prefix: String = ""): String = { + def newName(prefix: String): String = { val safePrefix = prefix.replaceAll("""[<>]""", """\$""") counters(safePrefix) += 1 val counter = counters(safePrefix) |