Skip to content

Commit a3780b4

Browse files
committed
Address review comments
1 parent c0a273f commit a3780b4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

language-server/src/dotty/tools/languageserver/DottyLanguageServer.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,11 @@ class DottyLanguageServer extends LanguageServer
258258
def lookup(name: Name): Symbol = {
259259
imp.expr.tpe.member(name).symbol
260260
}
261-
val importedSyms = imp.selectors.flatMap {
262-
case id: Ident if id.pos.contains(pos.pos) =>
263-
lookup(id.name) :: lookup(id.name.toTypeName) :: Nil
264-
case thicket @ Thicket((id: Ident) :: (_: Ident) :: Nil) if thicket.pos.contains(pos.pos) =>
265-
lookup(id.name) :: lookup(id.name.toTypeName) :: Nil
261+
val importedSyms = imp.selectors.find(_.pos.contains(pos.pos)) match {
262+
case Some(id: Ident) =>
263+
lookup(id.name.toTermName) :: lookup(id.name.toTypeName) :: Nil
264+
case Some(Thicket((id: Ident) :: (_: Ident) :: Nil)) =>
265+
lookup(id.name.toTermName) :: lookup(id.name.toTypeName) :: Nil
266266
case _ =>
267267
Nil
268268
}

0 commit comments

Comments
 (0)