File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -4250,13 +4250,14 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
4250
4250
else formals1
4251
4251
implicitArgs(formals2, argIndex + 1 , pt)
4252
4252
4253
+ val pt1 = pt.deepenProtoTrans
4254
+ if ((pt1 `ne` pt) && (pt1 ne sharpenedPt) && constrainResult(tree.symbol, wtp, pt1)) {
4255
+ return implicitArgs(formals, argIndex, pt1)
4256
+ }
4253
4257
val arg = inferImplicitArg(formal, tree.span.endPos)
4254
4258
arg.tpe match
4255
4259
case failed : AmbiguousImplicits =>
4256
- val pt1 = pt.deepenProtoTrans
4257
- if (pt1 `ne` pt) && (pt1 ne sharpenedPt) && constrainResult(tree.symbol, wtp, pt1)
4258
- then implicitArgs(formals, argIndex, pt1)
4259
- else arg :: implicitArgs(formals1, argIndex + 1 , pt1)
4260
+ arg :: implicitArgs(formals1, argIndex + 1 , pt1)
4260
4261
case failed : SearchFailureType =>
4261
4262
lazy val defaultArg = findDefaultArgument(argIndex)
4262
4263
.showing(i " default argument: for $formal, $tree, $argIndex = $result" , typr)
You can’t perform that action at this time.
0 commit comments