Skip to content

Commit 2a5d062

Browse files
committed
Move conditions and update doc
1 parent de16b01 commit 2a5d062

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

compiler/src/dotty/tools/dotc/interactive/Completion.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,9 @@ object Completion {
240240
* 4. have an existing source symbol,
241241
* 5. are the module class in case of packages,
242242
* 6. are mutable accessors, to exclude setters for `var`,
243-
* 7. have same term/type kind as name prefix given so far
243+
* 7. symbol is not a package object
244+
* 8. symbol is not an atifact of the compiler
245+
* 9. have same term/type kind as name prefix given so far
244246
*/
245247
private def include(sym: Symbol, nameInScope: Name)(implicit ctx: Context): Boolean =
246248
nameInScope.startsWith(prefix) &&
@@ -249,12 +251,12 @@ object Completion {
249251
sym.sourceSymbol.exists &&
250252
(!sym.is(Package) || !sym.moduleClass.exists) &&
251253
!sym.is(allOf(Mutable, Accessor)) &&
254+
!sym.isPackageObject &&
255+
!sym.is(Artifact) &&
252256
(
253257
(mode.is(Mode.Term) && sym.isTerm)
254258
|| (mode.is(Mode.Type) && (sym.isType || sym.isStable))
255-
) &&
256-
!sym.isPackageObject &&
257-
!sym.is(Artifact)
259+
)
258260

259261
/**
260262
* Find all the members of `site` that are accessible and which should be included in `info`.

0 commit comments

Comments
 (0)