Skip to content

Commit

Permalink
Compute completions at typerPhase (#16371)
Browse files Browse the repository at this point in the history
Fixes #16360
  • Loading branch information
odersky authored Nov 18, 2022
2 parents 57808b6 + ed14fbf commit 7813558
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/interactive/Completion.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import dotty.tools.dotc.core.Symbols.{NoSymbol, Symbol, defn, newSymbol}
import dotty.tools.dotc.core.StdNames.nme
import dotty.tools.dotc.core.SymDenotations.SymDenotation
import dotty.tools.dotc.core.TypeError
import dotty.tools.dotc.core.Phases
import dotty.tools.dotc.core.Types.{AppliedType, ExprType, MethodOrPoly, NameFilter, NoType, RefinedType, TermRef, Type, TypeProxy}
import dotty.tools.dotc.parsing.Tokens
import dotty.tools.dotc.util.Chars
Expand Down Expand Up @@ -45,7 +46,7 @@ object Completion {
*/
def completions(pos: SourcePosition)(using Context): (Int, List[Completion]) = {
val path = Interactive.pathTo(ctx.compilationUnit.tpdTree, pos.span)
computeCompletions(pos, path)(using Interactive.contextOfPath(path))
computeCompletions(pos, path)(using Interactive.contextOfPath(path).withPhase(Phases.typerPhase))
}

/**
Expand Down

0 comments on commit 7813558

Please sign in to comment.