summaryrefslogtreecommitdiff
path: root/src/compiler/scala/reflect/internal/Names.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-01-23 08:19:32 -0800
committerPaul Phillips <paulp@improving.org>2012-01-23 10:11:52 -0800
commit5cbd7d06eb8fe81bc3812ee99de05b1f4bd820fe (patch)
tree4ab1a9e75afad397b4602f288298fb2403db05bf /src/compiler/scala/reflect/internal/Names.scala
parentec3438c28987a38a3c03ebb5fe084709384b485a (diff)
downloadscala-5cbd7d06eb8fe81bc3812ee99de05b1f4bd820fe.tar.gz
scala-5cbd7d06eb8fe81bc3812ee99de05b1f4bd820fe.tar.bz2
scala-5cbd7d06eb8fe81bc3812ee99de05b1f4bd820fe.zip
Figured out the "$class$1" problem.
In lambda lift traits are renamed independently of their implementation classes, leading in the case of a method-defined trait to an interface called A$1 and an impl class called A$class$1 rather than A$1$class. This is now remedied.
Diffstat (limited to 'src/compiler/scala/reflect/internal/Names.scala')
-rw-r--r--src/compiler/scala/reflect/internal/Names.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/reflect/internal/Names.scala b/src/compiler/scala/reflect/internal/Names.scala
index b960695f51..907b564d4c 100644
--- a/src/compiler/scala/reflect/internal/Names.scala
+++ b/src/compiler/scala/reflect/internal/Names.scala
@@ -77,7 +77,11 @@ trait Names extends api.Names {
def newTermName(cs: Array[Char]): TermName = newTermName(cs, 0, cs.length)
def newTypeName(cs: Array[Char]): TypeName = newTypeName(cs, 0, cs.length)
- /** Create a term name from the characters in cs[offset..offset+len-1]. */
+ /** Create a term name from the characters in cs[offset..offset+len-1].
+ * TODO - have a mode where name validation is performed at creation time
+ * (e.g. if a name has the string "$class" in it, then fail if that
+ * string is not at the very end.)
+ */
protected def newTermName(cs: Array[Char], offset: Int, len: Int, cachedString: String): TermName = {
val h = hashValue(cs, offset, len) & HASH_MASK
var n = termHashtable(h)