Skip to content

Commit 6e5d5a2

Browse files
committed
make it a bit faster, as it is only allowed in constructor
1 parent b3260c1 commit 6e5d5a2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

compiler/src/dotty/tools/dotc/interactive/Completion.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import dotty.tools.dotc.util.SourcePosition
2323

2424
import scala.collection.mutable
2525
import scala.util.control.NonFatal
26-
import dotty.tools.dotc.core.Types.TypeRef
2726

2827
/**
2928
* One of the results of a completion query.
@@ -482,10 +481,10 @@ object Completion {
482481
def appendMemberSyms(name: Name, buf: mutable.Buffer[SingleDenotation]): Unit =
483482
try
484483
val member = site.member(name)
485-
if member.symbol.isAccessibleFrom(site) then
486-
buf ++= member.alternatives
487-
else
484+
if member.symbol.is(ParamAccessor) && !member.symbol.isAccessibleFrom(site) then
488485
buf ++= site.nonPrivateMember(name).alternatives
486+
else
487+
buf ++= member.alternatives
489488
catch
490489
case ex: TypeError =>
491490

0 commit comments

Comments
 (0)