@@ -4473,12 +4473,15 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
44734473 def argHasDefault = hasDefaultParams && ! defaultArg.isEmpty
44744474
44754475 def canProfitFromMoreConstraints =
4476+ ! ctx.mode.is(Mode .ImplicitExploration )
4477+ && {
44764478 arg.tpe.isInstanceOf [AmbiguousImplicits ]
44774479 // Ambiguity could be decided by more constraints
44784480 || ! isFullyDefined(formal, ForceDegree .none) && ! argHasDefault
44794481 // More context might constrain type variables which could make implicit scope larger.
44804482 // But in this case we should search with additional arguments typed only if there
44814483 // is no default argument.
4484+ }
44824485
44834486 // Try to constrain the result using `pt1`, but back out if a BadTyperStateAssertion
44844487 // is thrown. TODO Find out why the bad typer state arises and prevent it. The try-catch
@@ -4585,11 +4588,9 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
45854588 issueErrors(tree, args, failureType)
45864589 else
45874590 val app = cpy.Apply (tree)(untpd.TypedSplice (tree), namedArgs)
4588- // old-style implicit needs to be marked using so that implicits are searched
4589- val needsUsing = wtp.isImplicitMethod || wtp.match
4590- case MethodType (ContextBoundParamName (_) :: _) => sourceVersion.isAtLeast(`3.4`)
4591- case _ => false
4592- if needsUsing then app.setApplyKind(ApplyKind .Using )
4591+ // avoid warning if method is old-style implicit that context bounds will be contextual
4592+ // also required for correctly reporting implicit not found
4593+ app.setApplyKind(ApplyKind .Using )
45934594 typr.println(i " try with default implicit args $app" )
45944595 // If the retyped tree still has an error type and is an `Apply`
45954596 // node, we can report the errors for each argument nicely.
0 commit comments