Skip to content

Commit ef339e3

Browse files
committed
Address review comments
1 parent 38517e4 commit ef339e3

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
@@ -262,11 +262,11 @@ class DottyLanguageServer extends LanguageServer
262262
def lookup(name: Name): Symbol = {
263263
imp.expr.tpe.member(name).symbol
264264
}
265-
val importedSyms = imp.selectors.flatMap {
266-
case id: Ident if id.pos.contains(pos.pos) =>
267-
lookup(id.name) :: lookup(id.name.toTypeName) :: Nil
268-
case thicket @ Thicket((id: Ident) :: (_: Ident) :: Nil) if thicket.pos.contains(pos.pos) =>
269-
lookup(id.name) :: lookup(id.name.toTypeName) :: Nil
265+
val importedSyms = imp.selectors.find(_.pos.contains(pos.pos)) match {
266+
case Some(id: Ident) =>
267+
lookup(id.name.toTermName) :: lookup(id.name.toTypeName) :: Nil
268+
case Some(Thicket((id: Ident) :: (_: Ident) :: Nil)) =>
269+
lookup(id.name.toTermName) :: lookup(id.name.toTypeName) :: Nil
270270
case _ =>
271271
Nil
272272
}

0 commit comments

Comments
 (0)