diff options
author | Paul Phillips <paulp@improving.org> | 2009-04-29 16:01:20 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-04-29 16:01:20 +0000 |
commit | a79e84b239673838ee64fc232d8a27e766c47730 (patch) | |
tree | 6443e1e5295b7ca80115a89a3dfc009523f1d914 /src/compiler | |
parent | a62eceab93925296a9c21c6d8ca7978e0b669aa4 (diff) | |
download | scala-a79e84b239673838ee64fc232d8a27e766c47730.tar.gz scala-a79e84b239673838ee64fc232d8a27e766c47730.tar.bz2 scala-a79e84b239673838ee64fc232d8a27e766c47730.zip |
added isInstanceOf/asInstanceOf to repl completion
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/interpreter/Completion.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/Completion.scala b/src/compiler/scala/tools/nsc/interpreter/Completion.scala index 3530a1c375..2a6362568a 100644 --- a/src/compiler/scala/tools/nsc/interpreter/Completion.scala +++ b/src/compiler/scala/tools/nsc/interpreter/Completion.scala @@ -84,9 +84,11 @@ class Completion(val interpreter: Interpreter) extends Completor { case _ => Result(ids ::: pkgs, 0) } + // a few keywords which don't appear as methods via reflection + val memberKeywords = List("isInstanceOf", "asInstanceOf") def doDotted(): Result = { lazy val pkgs = filt(membersOfPath(path)) - lazy val ids = filt(membersOfId(path)) + lazy val ids = filt(membersOfId(path) ::: memberKeywords) lazy val statics = filt(completeStaticMembers(path)) if (!pkgs.isEmpty) Result(pkgs, path.length + 1) |