File tree 2 files changed +4
-7
lines changed
compiler/src/dotty/tools/dotc/interactive
language-server/src/dotty/tools/languageserver 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -338,6 +338,7 @@ object Interactive {
338
338
val tree = utree.asInstanceOf [tpd.NameTree ]
339
339
if (tree.symbol.exists
340
340
&& ! tree.symbol.is(Synthetic )
341
+ && ! tree.symbol.isPrimaryConstructor
341
342
&& tree.pos.exists
342
343
&& ! tree.pos.isZeroExtent
343
344
&& (include.isReferences || isDefinition(tree))
@@ -373,8 +374,7 @@ object Interactive {
373
374
)(implicit ctx : Context ): List [SourceTree ] = {
374
375
val linkedSym = symbol.linkedClass
375
376
val fullPredicate : NameTree => Boolean = tree =>
376
- ( ! tree.symbol.isPrimaryConstructor
377
- && (includes.isDefinitions || ! Interactive .isDefinition(tree))
377
+ ( (includes.isDefinitions || ! Interactive .isDefinition(tree))
378
378
&& ( Interactive .matchSymbol(tree, symbol, includes)
379
379
|| ( includes.isLinkedClass
380
380
&& linkedSym.exists
Original file line number Diff line number Diff line change @@ -457,10 +457,7 @@ class DottyLanguageServer extends LanguageServer
457
457
implicit val ctx = driver.currentCtx
458
458
459
459
val uriTrees = driver.openedTrees(uri)
460
- val predicate = (tree : NameTree ) => {
461
- val sym = tree.symbol
462
- ! sym.isLocal && ! sym.isPrimaryConstructor
463
- }
460
+ val predicate = (tree : NameTree ) => ! tree.symbol.isLocal
464
461
465
462
val defs = Interactive .namedTrees(uriTrees, Include .empty, predicate)
466
463
(for {
@@ -473,7 +470,7 @@ class DottyLanguageServer extends LanguageServer
473
470
val query = params.getQuery
474
471
def predicate (implicit ctx : Context ): NameTree => Boolean = { tree =>
475
472
val sym = tree.symbol
476
- ! sym.isLocal && ! sym.isPrimaryConstructor && tree.name.toString.contains(query)
473
+ ! sym.isLocal && tree.name.toString.contains(query)
477
474
}
478
475
479
476
drivers.values.toList.flatMap { driver =>
You can’t perform that action at this time.
0 commit comments