File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
compiler/src/dotty/tools/dotc/interactive
language-server/src/dotty/tools/languageserver Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,7 @@ object Interactive {
185185 private def handle (utree : untpd.NameTree ): Unit = {
186186 val tree = utree.asInstanceOf [tpd.NameTree ]
187187 if (tree.symbol.exists
188+ && tree.name != StdNames .nme.ERROR
188189 && ! tree.symbol.is(Synthetic )
189190 && ! tree.symbol.isPrimaryConstructor
190191 && tree.span.exists
Original file line number Diff line number Diff line change @@ -489,18 +489,16 @@ class DottyLanguageServer extends LanguageServer
489489
490490 val uriTrees = driver.openedTrees(uri)
491491
492- // Excludes locals from synthetic symbols (with the exception of enums members)
493- // and erroroneous trees.
494- val excludeLocalsFromSyntheticSymbols = (n : NameTree ) => {
492+ // Excludes type and term params from synthetic symbols
493+ val excludeParamsFromSyntheticSymbols = (n : NameTree ) => {
495494 val owner = n.symbol.owner
496- n.symbol.is(Case ) || {
497- n.name != StdNames .nme.ERROR &&
495+ ! n.symbol.is(Param ) || {
498496 ! owner.is(Synthetic ) &&
499497 ! owner.isPrimaryConstructor
500498 }
501499 }
502500
503- val defs = Interactive .namedTrees(uriTrees, Include .local, excludeLocalsFromSyntheticSymbols )
501+ val defs = Interactive .namedTrees(uriTrees, Include .local, excludeParamsFromSyntheticSymbols )
504502
505503 (for {
506504 d <- defs if (! isWorksheetWrapper(d) && ! isTopLevelWrapper(d))
You can’t perform that action at this time.
0 commit comments