Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ object Interactive {
/** Filter for names that should appear when looking for completions. */
private[this] object completionsFilter extends NameFilter {
def apply(pre: Type, name: Name)(implicit ctx: Context): Boolean =
!name.isConstructorName && name.is(SimpleNameKind)
!name.isConstructorName && name.toTermName.info.kind == SimpleNameKind
}

/** Find named trees with a non-empty position whose symbol match `sym` in `trees`.
Expand Down
6 changes: 6 additions & 0 deletions compiler/test/dotty/tools/repl/TabcompleteTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ class TabcompleteTests extends ReplTest {
comp.suggestions.sorted == List("slice", "sliding"))
}

@Test def tabCompleteModule: Unit =
fromInitialState{ implicit s =>
val comp = tabComplete("scala.Pred")
assertEquals(comp.suggestions,List("Predef"))
}

@Test def autoCompleteValAssign: Unit =
fromInitialState { implicit s => tabComplete("val x = 5") }

Expand Down