diff options
author | Paul Phillips <paulp@improving.org> | 2012-08-16 15:01:23 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-09-01 20:17:22 -0700 |
commit | 178f7a4511cf4274a8bc3016d9ac8481202128d2 (patch) | |
tree | 769f3b6d83ceda36354bfec754c91e62096430a1 /src/reflect/scala/reflect/internal/Names.scala | |
parent | d3d195966b4556065d0658e7ed09f38e00eed593 (diff) | |
download | scala-178f7a4511cf4274a8bc3016d9ac8481202128d2.tar.gz scala-178f7a4511cf4274a8bc3016d9ac8481202128d2.tar.bz2 scala-178f7a4511cf4274a8bc3016d9ac8481202128d2.zip |
Worked around SI-6161 by annotating abstract type.
Diffstat (limited to 'src/reflect/scala/reflect/internal/Names.scala')
-rw-r--r-- | src/reflect/scala/reflect/internal/Names.scala | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/reflect/scala/reflect/internal/Names.scala b/src/reflect/scala/reflect/internal/Names.scala index 2fdf27d847..3f85db0f54 100644 --- a/src/reflect/scala/reflect/internal/Names.scala +++ b/src/reflect/scala/reflect/internal/Names.scala @@ -149,11 +149,15 @@ trait Names extends api.Names with LowPriorityNames { type ThisNameType >: Null <: Name protected[this] def thisName: ThisNameType + // Note that "Name with ThisNameType" should be redundant + // because ThisNameType <: Name, but due to SI-6161 the + // compile loses track of this fact. + /** Index into name table */ def start: Int = index /** The next name in the same hash bucket. */ - def next: ThisNameType + def next: Name with ThisNameType /** The length of this name. */ final def length: Int = len @@ -169,13 +173,13 @@ trait Names extends api.Names with LowPriorityNames { def bothNames: List[Name] = List(toTermName, toTypeName) /** Return the subname with characters from from to to-1. */ - def subName(from: Int, to: Int): ThisNameType + def subName(from: Int, to: Int): Name with ThisNameType /** Return a new name of the same variety. */ - def newName(str: String): ThisNameType + def newName(str: String): Name with ThisNameType /** Return a new name based on string transformation. */ - def mapName(f: String => String): ThisNameType = newName(f(toString)) + def mapName(f: String => String): Name with ThisNameType = newName(f(toString)) /** Copy bytes of this name to buffer cs, starting at position `offset`. */ final def copyChars(cs: Array[Char], offset: Int) = |