From 345c1e86c2294a9d87a9effdb6ba9ab9e518229c Mon Sep 17 00:00:00 2001 From: odersky Date: Sun, 19 May 2024 17:40:30 +0200 Subject: [PATCH] Enable new implicit search mode that avoids loops from 3.6 --- compiler/src/dotty/tools/dotc/typer/Implicits.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/typer/Implicits.scala b/compiler/src/dotty/tools/dotc/typer/Implicits.scala index 54821444aed6..3fe8d6fae8a3 100644 --- a/compiler/src/dotty/tools/dotc/typer/Implicits.scala +++ b/compiler/src/dotty/tools/dotc/typer/Implicits.scala @@ -1718,7 +1718,7 @@ trait Implicits: SearchSuccess(tpd.ref(ref).withSpan(span.startPos), ref, 0)(ctx.typerState, ctx.gadt) case _ => searchImplicit(ctx.implicits, - if sourceVersion.isAtLeast(SourceVersion.future) then SearchMode.New + if sourceVersion.isAtLeast(SourceVersion.`3.6`) then SearchMode.New else if sourceVersion.isAtLeast(SourceVersion.`3.5`) then SearchMode.CompareErr else if sourceVersion.isAtLeast(SourceVersion.`3.4`) then SearchMode.CompareWarn else SearchMode.Old)