Skip to content

Commit 081a781

Browse files
committed
Some further polishings
1 parent 9553053 commit 081a781

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

compiler/src/dotty/tools/dotc/core/NameKinds.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ object NameKinds {
206206
override def definesNewName = true
207207

208208
def mkString(underlying: TermName, info: ThisInfo) = {
209-
val safePrefix = str.sanitize(underlying.toString + separator)
209+
val safePrefix = str.sanitize(underlying.toString) + separator
210210
safePrefix + info.num
211211
}
212212

compiler/src/dotty/tools/dotc/util/FreshNameCreator.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ object FreshNameCreator {
2222
* call to this function (provided the prefix does not end in a digit).
2323
*/
2424
def newName(prefix: TermName, unique: UniqueNameKind): TermName = {
25-
val key = str.sanitize(prefix.toString + unique.separator)
25+
val key = str.sanitize(prefix.toString) + unique.separator
2626
counters(key) += 1
27-
val counter = counters(key)
28-
prefix.derived(unique.NumberedInfo(counter))
27+
prefix.derived(unique.NumberedInfo(counters(key)))
2928
}
3029
}
3130
}

0 commit comments

Comments
 (0)