Skip to content

Commit d994f20

Browse files
mbovelolhotaknatsukagami
committed
Avoid infinite recursion when looking for suggestions
Co-authored-by: Ondřej Lhoták <[email protected]> Co-authored-by: Nguyen Pham <[email protected]>
1 parent af655c9 commit d994f20

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/src/dotty/tools/dotc/typer/ImportSuggestions.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ trait ImportSuggestions:
9797
if refSym.is(JavaDefined) then Nil
9898
else nestedRoots(site)
9999
nested
100+
.filter(mbr => mbr.asTerm != ref.termSymbol)
100101
.map(mbr => TermRef(ref, mbr.asTerm))
101102
.flatMap(rootsIn)
102103
.toList

0 commit comments

Comments
 (0)