@@ -9,6 +9,7 @@ import ast.{NavigateAST, Trees, tpd, untpd}
9
9
import core ._ , core .Decorators .{sourcePos => _ , _ }
10
10
import Contexts ._ , Flags ._ , Names ._ , NameOps ._ , Symbols ._ , SymDenotations ._ , Trees ._ , Types ._
11
11
import util .Positions ._ , util .SourcePosition
12
+ import core .Denotations .SingleDenotation
12
13
import NameKinds .SimpleNameKind
13
14
14
15
/** High-level API to get information out of typed trees, designed to be used by IDEs.
@@ -126,13 +127,11 @@ object Interactive {
126
127
safely {
127
128
if (boundary != NoSymbol ) {
128
129
val boundaryCtx = ctx.withOwner(boundary)
129
- prefix.memberDenots(completionsFilter, (name, buf) =>
130
- buf ++= prefix.member(name).altsWith{ d =>
131
- ! d.isAbsent &&
132
- ! d.is(Synthetic ) && ! d.is(Artifact ) &&
133
- d.symbol.isAccessibleFrom(prefix)(boundaryCtx)
134
- }
135
- ).map(_.symbol).toList
130
+ def exclude (sym : Symbol ) = sym.isAbsent || sym.is(Synthetic ) || sym.is(Artifact )
131
+ def addMember (name : Name , buf : mutable.Buffer [SingleDenotation ]): Unit =
132
+ buf ++= prefix.member(name).altsWith(d =>
133
+ ! exclude(d) && d.symbol.isAccessibleFrom(prefix)(boundaryCtx))
134
+ prefix.memberDenots(completionsFilter, addMember).map(_.symbol).toList
136
135
}
137
136
else Nil
138
137
}
0 commit comments