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