Skip to content

Commit 70c0c89

Browse files
committed
Address review comments
1 parent 6e8475f commit 70c0c89

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
@@ -285,11 +285,11 @@ class DottyLanguageServer extends LanguageServer
285285
def lookup(name: Name): Symbol = {
286286
imp.expr.tpe.member(name).symbol
287287
}
288-
val importedSyms = imp.selectors.flatMap {
289-
case id: Ident if id.pos.contains(pos.pos) =>
290-
lookup(id.name) :: lookup(id.name.toTypeName) :: Nil
291-
case thicket @ Thicket((id: Ident) :: (_: Ident) :: Nil) if thicket.pos.contains(pos.pos) =>
292-
lookup(id.name) :: lookup(id.name.toTypeName) :: Nil
288+
val importedSyms = imp.selectors.find(_.pos.contains(pos.pos)) match {
289+
case Some(id: Ident) =>
290+
lookup(id.name.toTermName) :: lookup(id.name.toTypeName) :: Nil
291+
case Some(Thicket((id: Ident) :: (_: Ident) :: Nil)) =>
292+
lookup(id.name.toTermName) :: lookup(id.name.toTypeName) :: Nil
293293
case _ =>
294294
Nil
295295
}

0 commit comments

Comments
 (0)