diff options
author | Eugene Vigdorchik <eugenevigdorchik@epfl.ch> | 2010-09-17 08:56:55 +0000 |
---|---|---|
committer | Eugene Vigdorchik <eugenevigdorchik@epfl.ch> | 2010-09-17 08:56:55 +0000 |
commit | 94e9b95f9bb41797031efee71cfb349fce0a2261 (patch) | |
tree | c9f39d03b9c10fa268abb37286a539fd7fc5df7b /src/compiler | |
parent | a4e163d2627f332f4c05fcf729b8bb5e843b0ed1 (diff) | |
download | scala-94e9b95f9bb41797031efee71cfb349fce0a2261.tar.gz scala-94e9b95f9bb41797031efee71cfb349fce0a2261.tar.bz2 scala-94e9b95f9bb41797031efee71cfb349fce0a2261.zip |
Correctly get all scope symbols and members.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/interactive/Global.scala | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala index 454aa5d701..59221eb348 100644 --- a/src/compiler/scala/tools/nsc/interactive/Global.scala +++ b/src/compiler/scala/tools/nsc/interactive/Global.scala @@ -438,16 +438,14 @@ self => while (cx != NoContext) { for (sym <- cx.scope) addScopeMember(sym, NoPrefix, EmptyTree) + if (cx == cx.enclClass) { + val pre = cx.prefix + for (sym <- pre.members) + addScopeMember(sym, pre, EmptyTree) + } cx = cx.outer } - cx = context.enclClass - while (cx != NoContext) { - val pre = cx.prefix - for (sym <- pre.members) - addScopeMember(sym, pre, EmptyTree) - cx = cx.outer.enclClass - } for (imp <- context.imports) { val pre = imp.qual.tpe for (sym <- imp.allImportedSymbols) { |