@@ -499,14 +499,18 @@ class Completions(
499
499
val query = completionPos.query
500
500
if completionMode.is(Mode .Scope ) && query.nonEmpty then
501
501
val visitor = new CompilerSearchVisitor (sym =>
502
- indexedContext.lookupSym(sym) match
503
- case IndexedContext .Result .InScope => false
504
- case _ =>
505
- completionsWithSuffix(
506
- sym,
507
- sym.decodedName,
508
- CompletionValue .Workspace (_, _, _, sym)
509
- ).map(visit).forall(_ == true ),
502
+ if ! (sym.is(Flags .ExtensionMethod ) ||
503
+ (sym.maybeOwner.is(Flags .Implicit ) && sym.maybeOwner.isClass))
504
+ then
505
+ indexedContext.lookupSym(sym) match
506
+ case IndexedContext .Result .InScope => false
507
+ case _ =>
508
+ completionsWithSuffix(
509
+ sym,
510
+ sym.decodedName,
511
+ CompletionValue .Workspace (_, _, _, sym)
512
+ ).map(visit).forall(_ == true )
513
+ else false ,
510
514
)
511
515
Some (search.search(query, buildTargetIdentifier, visitor).nn)
512
516
else if completionMode.is(Mode .Member ) then
@@ -528,16 +532,18 @@ class Completions(
528
532
)
529
533
end isImplicitClass
530
534
531
- def isImplicitClassMethod = sym.is(Flags .Method ) && ! sym.isConstructor &&
532
- isImplicitClass(sym.maybeOwner)
535
+ def isDefaultVariableSetter = sym.is(Flags .Accessor ) && sym.is(Flags .Method )
536
+ def isImplicitClassMember =
537
+ isImplicitClass(sym.maybeOwner) && ! sym.is(Flags .Synthetic ) && sym.isPublic
538
+ && ! sym.isConstructor && ! isDefaultVariableSetter
533
539
534
540
if isExtensionMethod then
535
541
completionsWithSuffix(
536
542
sym,
537
543
sym.decodedName,
538
544
CompletionValue .Extension (_, _, _)
539
545
).map(visit).forall(_ == true )
540
- else if isImplicitClassMethod then
546
+ else if isImplicitClassMember then
541
547
completionsWithSuffix(
542
548
sym,
543
549
sym.decodedName,
0 commit comments