summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-12-16 17:37:27 +0000
committerPaul Phillips <paulp@improving.org>2009-12-16 17:37:27 +0000
commiteb46c9ab39c5b95724f17908225b2a3728e7b72d (patch)
tree4128dca78aa9d8c740a6233a74ba2fe1bf99a2aa /src/compiler
parentcc8e4136b62f21ba8fb0bfa9db3b82abe48d22b7 (diff)
downloadscala-eb46c9ab39c5b95724f17908225b2a3728e7b72d.tar.gz
scala-eb46c9ab39c5b95724f17908225b2a3728e7b72d.tar.bz2
scala-eb46c9ab39c5b95724f17908225b2a3728e7b72d.zip
Catch expanded names before they are visible in...
Catch expanded names before they are visible in completion. no review.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/Interpreter.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/Interpreter.scala b/src/compiler/scala/tools/nsc/Interpreter.scala
index 7ca2a4ecf9..b1065113ad 100644
--- a/src/compiler/scala/tools/nsc/Interpreter.scala
+++ b/src/compiler/scala/tools/nsc/Interpreter.scala
@@ -873,6 +873,9 @@ class Interpreter(val settings: Settings, out: PrintWriter)
| map(_.getName) .
| mkString(" ")""".stripMargin.format(filterFlags)
+ private def getOriginalName(name: String): String =
+ nme.originalName(newTermName(name)).toString
+
/** The main entry point for tab-completion. When the user types x.<tab>
* this method is called with "x" as an argument, and it discovers the
* fields and methods of x via reflection and returns their names to jline.
@@ -892,7 +895,7 @@ class Interpreter(val settings: Settings, out: PrintWriter)
str.substring(str.indexOf('=') + 1).trim .
split(" ").toList .
- map(decode) .
+ map(x => decode(getOriginalName(x))) .
filterNot(shouldHide) .
removeDuplicates
}