diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-07-30 13:17:17 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-08-02 15:36:55 +0200 |
commit | a727c6fc198d33842ff85d8a16d48143a6757d51 (patch) | |
tree | 3b995ade8066488c3ac42d7b65e0bb02b976cabc /src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala | |
parent | 937da62be2834a646a31dbfb01527a82672f111e (diff) | |
download | scala-a727c6fc198d33842ff85d8a16d48143a6757d51.tar.gz scala-a727c6fc198d33842ff85d8a16d48143a6757d51.tar.bz2 scala-a727c6fc198d33842ff85d8a16d48143a6757d51.zip |
SI-5732 members and derivatives now return Scope
Firstly this unifies the reflection API - now both decls and members
return Scope (not Scope and List[Symbol] as it were before).
Secondly this fixes SI-5732 without having to sort the result of members.
Type.members now returns Scope, a distinguished type, which has the
`sorted` method, which does the required sorting if necessary.
Also removes nonPrivateMembers and nonPrivateDeclarations to keep the API
minimalistic (as can be seen from their implementation in internal.Types
they are just members and decls with bridges and private members removed).
Diffstat (limited to 'src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala b/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala index c429e3b196..b9849e40d1 100644 --- a/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala +++ b/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala @@ -52,10 +52,10 @@ class JLineCompletion(val intp: IMain) extends Completion with CompletionOutput // XXX we'd like to say "filterNot (_.isDeprecated)" but this causes the // compiler to crash for reasons not yet known. - def members = afterTyper((effectiveTp.nonPrivateMembers ++ anyMembers) filter (_.isPublic)) - def methods = members filter (_.isMethod) - def packages = members filter (_.isPackage) - def aliases = members filter (_.isAliasType) + def members = afterTyper((effectiveTp.nonPrivateMembers.toList ++ anyMembers) filter (_.isPublic)) + def methods = members.toList filter (_.isMethod) + def packages = members.toList filter (_.isPackage) + def aliases = members.toList filter (_.isAliasType) def memberNames = members map tos def methodNames = methods map tos |