File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1415,7 +1415,13 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
1415
1415
implicitArgError(d " no implicit argument of type $formal found for $where" + failure.postscript)
1416
1416
}
1417
1417
}
1418
- if (args.exists(_.isEmpty)) { assert(constr eq ctx.typerState.constraint); tree }
1418
+ if (args.exists(_.isEmpty)) {
1419
+ // If there are several arguments, some arguments might already
1420
+ // have influenced the context, binfing variables, but later ones
1421
+ // might fail. In that case the constraint needs to be reset.
1422
+ ctx.typerState.constraint = constr
1423
+ tree
1424
+ }
1419
1425
else adapt(tpd.Apply (tree, args), pt)
1420
1426
}
1421
1427
if ((pt eq WildcardType ) || original.isEmpty) addImplicitArgs
You can’t perform that action at this time.
0 commit comments