File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ trait ImportSuggestions:
5757 * skipped as an optimization, since they won't contain implicits anyway.
5858 */
5959 private def suggestionRoots (using Context ) =
60- val seen = mutable.Set [TermRef ]()
60+ val seen = mutable.Set [Symbol ]()
6161
6262 def lookInside (root : Symbol )(using Context ): Boolean =
6363 explore {
@@ -103,10 +103,10 @@ trait ImportSuggestions:
103103 .toList
104104
105105 def rootsIn (ref : TermRef )(using Context ): List [TermRef ] =
106- if seen.contains(ref) then Nil
106+ if seen.contains(ref.termSymbol ) then Nil
107107 else
108108 implicitsDetailed.println(i " search for suggestions in ${ref.symbol.fullName}" )
109- seen += ref
109+ seen += ref.termSymbol
110110 ref :: rootsStrictlyIn(ref)
111111
112112 def rootsOnPath (tp : Type )(using Context ): List [TermRef ] = tp match
Original file line number Diff line number Diff line change 1+ -- [E008] Not Found Error: tests/neg/22145c.scala:2:35 -----------------------------------------------------------------
2+ 2 | def bar(base: Collection) = base.foo // error
3+ | ^^^^^^^^
4+ | value foo is not a member of Collection
Original file line number Diff line number Diff line change 1+ trait Collection :
2+ def bar (base : Collection ) = base.foo // error
3+ object a extends Collection :
4+ def foo : Int = 0
5+ object b extends Collection :
6+ def foo : Int = 1
You can’t perform that action at this time.
0 commit comments