Skip to content

Commit 7d3adb8

Browse files
committed
Further tweaks to search history checking
1 parent 24f7a9d commit 7d3adb8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,8 +1461,6 @@ abstract class SearchHistory:
14611461
*/
14621462
def nest(cand: Candidate, pt: Type)(using Context): OpenSearch = OpenSearch(cand, pt, this)
14631463

1464-
def isByname(tp: Type): Boolean = tp.isInstanceOf[ExprType]
1465-
14661464
// The following are delegated to the root of this search history.
14671465
def linkBynameImplicit(tpe: Type)(using Context): TermRef =
14681466
root.linkBynameImplicit(tpe)
@@ -1479,7 +1477,7 @@ end SearchHistory
14791477

14801478
case class OpenSearch(cand: Candidate, pt: Type, outer: SearchHistory) extends SearchHistory:
14811479
val root = outer.root
1482-
val byname = outer.byname || isByname(pt)
1480+
val byname = outer.byname || pt.isByName
14831481
def open = (cand, pt) :: outer.open
14841482
end OpenSearch
14851483

@@ -1560,7 +1558,7 @@ final class SearchRoot extends SearchHistory:
15601558
* substituted with references into the dictionary.
15611559
*/
15621560
override def emitDictionary(span: Span, result: SearchResult)(using Context): SearchResult =
1563-
if (implicitDictionary == null || implicitDictionary.isEmpty) result
1561+
if (myImplicitDictionary == null || implicitDictionary.isEmpty) result
15641562
else
15651563
result match {
15661564
case failure: SearchFailure => failure

0 commit comments

Comments
 (0)