summaryrefslogtreecommitdiff
path: root/src/interactive/scala/tools
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-03-25 11:03:25 -0700
committerPaul Phillips <paulp@improving.org>2013-03-25 11:03:25 -0700
commit98daf03a902e9af902870448f9de17ff140d9bca (patch)
tree34557b2cc0f7aba376a38e2ee5d76ddd4e55f2d9 /src/interactive/scala/tools
parent1187c9896c097e6e591e5655b35f52c06b3c900a (diff)
downloadscala-98daf03a902e9af902870448f9de17ff140d9bca.tar.gz
scala-98daf03a902e9af902870448f9de17ff140d9bca.tar.bz2
scala-98daf03a902e9af902870448f9de17ff140d9bca.zip
Overhauled local/getter/setter name logic.
Sifted through extraneous methods trying to find consistency, consolidating and deprecating as I went. The original motivation for all this was the restoration of LOCAL_SUFFIX to originalName, because: It looks like in an attempt to make originalName print consistently with decodedName, I went a little too far and stripped invisible trailing spaces from originalName. This meant outer fields would have an originalName of '$outer' instead of '$outer ', which in turn could have caused them to be mis-recognized as outer accessors, because the logic of outerSource hinges upon "originalName == nme.OUTER". I don't know if this affected anything - I noticed it by inspection, improbably enough. Deprecated originalName - original, compared to what? - in favor of unexpandedName, which has a more obvious complement. Introduced string_== for the many spots where people have given up and are comparing string representations of names. A light dusting of types is still better than nothing. Editoral note: LOCAL_SUFFIX is the worst. Significant trailing whitespace! It's a time bomb.
Diffstat (limited to 'src/interactive/scala/tools')
-rw-r--r--src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala b/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala
index 9085eb56e6..c0ad245091 100644
--- a/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala
+++ b/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala
@@ -17,7 +17,7 @@ private[tests] trait CoreTestDefs
with AskCompletionAt {
def memberPrinter(member: compiler.Member): String =
- "[accessible: %5s] ".format(member.accessible) + "`" + (member.sym.toString() + member.tpe.toString()).trim() + "`"
+ "[accessible: %5s] ".format(member.accessible) + "`" + (member.sym.toString.trim + member.tpe.toString()).trim + "`"
override def runTest() {
askAllSources(CompletionMarker) { pos =>
@@ -29,7 +29,7 @@ private[tests] trait CoreTestDefs
// universal check file that we can provide for this to work
reporter.println("retrieved %d members".format(members.size))
compiler ask { () =>
- val filtered = members.filterNot(member => member.sym.name.toString == "getClass" || member.sym.isConstructor)
+ val filtered = members.filterNot(member => (member.sym.name string_== "getClass") || member.sym.isConstructor)
reporter.println(filtered.map(memberPrinter).sortBy(_.toString()).mkString("\n"))
}
}