Skip to content

Commit 7813558

Browse files
authored
Compute completions at typerPhase (#16371)
Fixes #16360
2 parents 57808b6 + ed14fbf commit 7813558

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import dotty.tools.dotc.core.Symbols.{NoSymbol, Symbol, defn, newSymbol}
1616
import dotty.tools.dotc.core.StdNames.nme
1717
import dotty.tools.dotc.core.SymDenotations.SymDenotation
1818
import dotty.tools.dotc.core.TypeError
19+
import dotty.tools.dotc.core.Phases
1920
import dotty.tools.dotc.core.Types.{AppliedType, ExprType, MethodOrPoly, NameFilter, NoType, RefinedType, TermRef, Type, TypeProxy}
2021
import dotty.tools.dotc.parsing.Tokens
2122
import dotty.tools.dotc.util.Chars
@@ -45,7 +46,7 @@ object Completion {
4546
*/
4647
def completions(pos: SourcePosition)(using Context): (Int, List[Completion]) = {
4748
val path = Interactive.pathTo(ctx.compilationUnit.tpdTree, pos.span)
48-
computeCompletions(pos, path)(using Interactive.contextOfPath(path))
49+
computeCompletions(pos, path)(using Interactive.contextOfPath(path).withPhase(Phases.typerPhase))
4950
}
5051

5152
/**

0 commit comments

Comments
 (0)