File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4286,11 +4286,11 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
42864286 }
42874287
42884288 val pt1 = pt.deepenProtoTrans
4289- tryConstrainType(pt1)
4289+ val isConstrained = tryConstrainType(pt1)
42904290 val arg = inferImplicitArg(formal, tree.span.endPos)
42914291 arg.tpe match
42924292 case failed : AmbiguousImplicits =>
4293- if (pt1 `ne` pt) && (pt1 ne sharpenedPt) && constrainResult(tree.symbol, wtp, pt1)
4293+ if ! isConstrained && (pt1 `ne` pt) && (pt1 ne sharpenedPt) && constrainResult(tree.symbol, wtp, pt1)
42944294 then implicitArgs(formals, argIndex, pt)
42954295 else arg :: implicitArgs(formals1, argIndex + 1 , pt)
42964296 case failed : SearchFailureType =>
You can’t perform that action at this time.
0 commit comments